Skip to content

Commit 5e77c08

Browse files
committed
Wrap userscript in anonymous function
1 parent 7be523f commit 5e77c08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

BHOUserScript/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void Run(object pDisp, ref object URL) // OnDocumentComplete handler
165165
str.Close();
166166
try
167167
{
168-
window.execScript(_c);
168+
window.execScript("(function(){" + _c + "})();");
169169
}
170170
catch (Exception) { }
171171
}

0 commit comments

Comments
 (0)