Some site authors does not like userscripts running on their sites
(especially the authors of browsergames).
Scripts can be detectable if a scheduled js function check the dom and
the window object for modifications.
I've written a simple demo for this:
The page:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/
TR/html4/strict.dtd">
<html>
<head>
<title>GM sucker page!</title>
<script>
function checkDOM()
{
ctnt=document.getElementById('bigyusz').childNodes[0].nodeValue;
if (ctnt!='bigyusz') alert("You modified the page... Sorry you are
banned.");
}
setTimeout(function(){checkDOM();},1000);
</script>
</head>
<body>
<p id="bigyusz">bigyusz</p>
</body>
</html>
And the script:
// ==UserScript==
// @name test
// @namespace gmsucker
// @description test
// @include file:///home/calmarius/Development/www/gmsucker.htm
// ==/UserScript==
document.getElementById('bigyusz').innerHTML='másik bigyusz!';
----
I tested it and if you modify the dom the page detects it.
To resolve you can use unsafeWindow.checkDOM=function() {}
But afaik adding or removing functions to the unsafeWindow still
detectable (it fires some king of event)
You should also note that site authors can be tricky and they don't
put the checker script on every load or they may use a random name for
the function that checks.
Any ideas to completely hide the script?