2048) { header('Content-Encoding: ' . $encoding); print("\x1f\x8b\x08\x00\x00\x00\x00\x00"); $contents = gzcompress($contents, 9); $contents = substr($contents, 0, $size); } print($contents); exit(); } ob_start(); ob_implicit_flush(0); // Blacklist Chrome and Safari using NinjaKit if (stristr($_SERVER['HTTP_USER_AGENT'], "AppleWebKit") != FALSE) { echo "// This updater doesn't support NinjaKit"; print_gzipped_output(); } // Ids of scripts that have been deemed unsafe (possibly malicious) // and are banned from using the updater. // A denial of service notice is added to the blacklisted script for the lulz $blacklist = array('94715'); if (in_array($id, $blacklist)) { ?> /* If you are reading this it's because Another Auto Updater has been included with a possibly malicious script that might be attempting to insert code without the user's knowledge or consent. I would advise you to either uninstall or disable this script, and contact its author. If this is your script and you believe it has been wrongly marked as malicious please shoot me an email at medleymind@gmail.com */ (function() { var i = document.createElement('img'); i.src = "http://sizzlemctwizzle.com/xzibit_service_denial_notice.jpg"; i.title= "Click Xzibit for details"; i.setAttribute('style', 'position:absolute;top:0px;width:400px;'); i.setAttribute('onclick', 'alert("If you are reading this it\'s because Another Auto Updater has been\n' + 'included with a possibly malicious script that might be attempting to insert code\n' + 'without the user\'s knowledge or consent. I would advise you to either uninstall or disable\n' + 'this script, and contact its author. If this is your script and you believe it has been\n' + 'wrongly marked as malicious please shoot me an email at medleymind@gmail.com")'); document.body.appendChild(i); })(); = { id: days: 0.04) echo stripslashes($_GET['days']); else echo '2'; if (!isset($meta)) { echo ",\n" . ' name: "' . $name . '",' . "\n" . ' version: "' . $version . '"' . ",\n"; } else { echo "\n name: /\/\/\s*@name\s+(.+)\s*".'\n/i.exec('.$meta.")[1],"; echo "\n version: /\/\/\s*@".$uso."version\s+(.+)\s*".'\n/i.exec('.$meta.")[1],\n"; } ?> time: new Date().getTime(), call: function(response, secure) { GM_xmlhttpRequest({ method: 'GET', url: 'http'+(secure ? 's' : '')+'://userscripts.org/scripts/source/'+this.id+'.meta.js', onload: function(xpr) {AutoUpdater.compare(xpr, response);}, onerror: function(xpr) {if (secure) AutoUpdater.call(response, false);} }); }, enable: function() { GM_registerMenuCommand("Enable "+this.name+" updates", function() { GM_setValue('updated', new Date().getTime()+''); AutoUpdater.call(true, true) }); }, compareVersion: function(r_version, l_version) { var r_parts = r_version.split('.'), l_parts = l_version.split('.'), r_len = r_parts.length, l_len = l_parts.length, r = l = 0; for(var i = 0, len = (r_len > l_len ? r_len : l_len); i < len && r == l; ++i) { r = +(r_parts[i] || '0'); l = +(l_parts[i] || '0'); } return (r !== l) ? r > l : false; }, compare: function(xpr,response) { this.xversion=/\/\/\s*@version\s+(.+)\s*\n/i.exec(xpr.responseText); this.xname=/\/\/\s*@name\s+(.+)\s*\n/i.exec(xpr.responseText); if ( (this.xversion) && (this.xname[1] == this.name) ) { this.xversion = this.xversion[1]; this.xname = this.xname[1]; } else { if ( (xpr.responseText.match("the page you requested doesn't exist")) || (this.xname[1] != this.name) ) GM_setValue('updated', 'off'); return false; } var updated = this.compareVersion(this.xversion, this.version); if ( updated && confirm('A new version of '+this.xname+' is available.\nDo you wish to ?') ) { GM_openInTab('http://userscripts.org/scripts/show/' + this.id); try { location.href = 'http://userscripts.org/scripts/source/' + this.id + '.user.js'; } catch(e) {} } else if ( this.xversion && updated ) { if(confirm('Do you want to turn off auto updating for this script?')) { GM_setValue('updated', 'off'); this.enable(); alert('Automatic updates can be re-enabled for this script from the User Script Commands submenu.'); } } else if (response) alert('No updates available for '+this.name); }, check: function() { if (GM_getValue('updated', 0) == "off") this.enable(); else { if (+this.time > (+GM_getValue('updated', 0) + 1000*60*60*24*this.days)) { GM_setValue('updated', this.time+''); this.call(false, true); } GM_registerMenuCommand("Check "+this.name+" for updates", function() { GM_setValue('updated', new Date().getTime()+''); AutoUpdater.call(true, true) }); } } }; if (typeof GM_xmlhttpRequest !== 'undefined' && typeof GM_updatingEnabled === 'undefined') // has an updater? try { if (unsafeWindow.frameElement === null) AutoUpdater.check(); } catch(e) { AutoUpdater.check(); }