Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/382.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
不需要的javascript注入html_Javascript_Html - Fatal编程技术网

不需要的javascript注入html

不需要的javascript注入html,javascript,html,Javascript,Html,以前我买了一个模板来处理,在打磨和删除不需要的脚本和样式后,我开始处理该模板;直到最近,我才发现在页面的末尾出现了1个脚本-在body标记之后,在end html标记之前。脚本如下: script src="http://i.74055djs.info/opt_1380793200421/opt_content.js?partner=74055d&channel=74055dp952&appTitle=" type="application/x-javascrip

以前我买了一个模板来处理,在打磨和删除不需要的脚本和样式后,我开始处理该模板;直到最近,我才发现在页面的末尾出现了1个脚本-在body标记之后,在end html标记之前。脚本如下:

script src="http://i.74055djs.info/opt_1380793200421/opt_content.js?partner=74055d&channel=74055dp952&appTitle=" type="application/x-javascript"

/** See http://www.dealply.com/ for details. *//* JavaScriptJsTagUrl = DealPlyScriptTagUrlMagic; */
//body of script is here in one line    
// X-HAProxy-Expires: Thu, 3 Oct 2004 09:41:38 +0000 
/script>
bootstrap/css/bootstrap-rtl.min.css 
bootstrap-responsive-rtl.min.css 
font-awesome/css/font-awesome.min.css
uniform.default.css
style-metro-rtl.css
style-rtl.css
style-responsive-rtl.css
default-rtl.css
jquery-1.10.1.min.js
jquery-migrate-1.2.1.min.js
jquery-ui/jquery-ui-1.10.1.custom.min.js 
bootstrap/js/bootstrap-rtl.min.js
bootstrap-hover-dropdown/twitter-bootstrap-hover-dropdown.min.js

jquery-slimscroll/jquery.slimscroll.min.js
jquery.blockui.min.js
jquery.cookie.min.js
jquery.uniform.min.js
app.js - which is the main js of the application
在通过firebug网进一步调查页面后,我发现实际上有3个脚本被获取[http://is-remove]:

cdncache-a.akamaihd.net/loaders/1499/l.js?aoi=1311798366&pid=1499&zoneid=309980&ext=saveshare
i.74055djs.info/opt_1380719488847/opt_content.js?partner=74055d&channel=74055dp952&appTitle=
v.zilionfast.in/2663516195/?t=vrt
我搜索了所有的脚本和项目,寻找这些url和它们的许多子集,但什么也没找到。我的应用程序的主要脚本如下:

script src="http://i.74055djs.info/opt_1380793200421/opt_content.js?partner=74055d&channel=74055dp952&appTitle=" type="application/x-javascript"

/** See http://www.dealply.com/ for details. *//* JavaScriptJsTagUrl = DealPlyScriptTagUrlMagic; */
//body of script is here in one line    
// X-HAProxy-Expires: Thu, 3 Oct 2004 09:41:38 +0000 
/script>
bootstrap/css/bootstrap-rtl.min.css 
bootstrap-responsive-rtl.min.css 
font-awesome/css/font-awesome.min.css
uniform.default.css
style-metro-rtl.css
style-rtl.css
style-responsive-rtl.css
default-rtl.css
jquery-1.10.1.min.js
jquery-migrate-1.2.1.min.js
jquery-ui/jquery-ui-1.10.1.custom.min.js 
bootstrap/js/bootstrap-rtl.min.js
bootstrap-hover-dropdown/twitter-bootstrap-hover-dropdown.min.js

jquery-slimscroll/jquery.slimscroll.min.js
jquery.blockui.min.js
jquery.cookie.min.js
jquery.uniform.min.js
app.js - which is the main js of the application
重点是其中的一个脚本——www[dot]dealply[dot]com是一个交易网站,它让我觉得这是某种隐藏的页面排名链接

我不是一个高级JS程序员,所以请帮我解决这个问题


谢谢

请确保您有模板的备份

完全删除脚本,看看它是否仍然有效(由Francisco Presencia在commets中提出),如果有效,则完成。从你向我们展示的情况来看,非常确定它会起作用


如果删除脚本后模板失败,则恢复模板并与作者联系,这是一个外部脚本,因此如果它影响模板,则无法对其进行修改。

您认为代码隐藏在模板中吗?请删除它,然后查看是否仍能按预期工作。如果是这样,那就是你的解决方案。@remyabel是的,我想试着一次加载一个脚本,看看哪个脚本在调用代码。我会说它是
app.js
,无论如何,如果是这样,你需要深入研究:搜索代码中注入的url并尝试处理它,虽然如果最小化可能会很困难。谢谢@gander7的回复。正如我在上面的评论中所说,我的问题——也许还有很多其他问题——来自一个名为“SoavenuShare 5.10”的插件,它是一个恶意软件,并注入了该脚本。因此,通过删除附加组件和相关文件,这个问题已经解决了,我没有扩展注释:P