Userscripts.org currently contains over 2K scam scripts <div id="root"><br /><a href="http://s3.amazonaws.com/uso_ss/icon/163038/large.png?1365299642" id="icon" rel="lightbox" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;" title="Userscripts.org Scam Filter"><img alt="Large" src="http://s3.amazonaws.com/uso_ss/icon/163038/large.png?1365299642" width="92" /></a> <br /><br /><div id="section"><br /><div id="content"><br /><div id="heading"><br /><div id="install_script"><br /><h4 class="title"><br />Userscripts.org Scam Filter <a class="userjs" href="http://userscripts.org/scripts/source/163038.user.js">Install</a> </h4><br /><div class="title"><br /></div><br /><h4><br /><b>Userscripts.org currently contains over <abbr title="A conservative estimate...">2,000</abbr> scam scripts.</b></h4><br />There is currently no way to report scam scripts and have them officially removed. Scam Filter attempts to do the next best thing by detecting them for you.<br /><br /><br /><br /><b>Scam Filter checks script <a class="zem_slink" href="http://en.wikipedia.org/wiki/Author" rel="wikipedia nofollow" target="_blank" title="Author">authors</a> against a list of over 700 known scam, spam & copycat authors.</b><br /><br />For unknown authors, Scam Filter scans each script's code for known scam patterns. Likely <a class="zem_slink" href="http://en.wikipedia.org/wiki/Confidence_trick" rel="wikipedia nofollow" target="_blank" title="Confidence trick">scams</a> are then hidden. The filter works when you browse or search the <a href="http://userscripts.org/scripts">Userscripts.org script list</a>. A toggle link is provided to re-display hidden scripts.<br /><br /><a name='more'></a><br /><br /><br /><br /><b>Most of the "<a class="zem_slink" href="http://facebook.com/" rel="homepage nofollow" target="_blank" title="Facebook">Facebook</a> Auto Like" scripts are scams.</b><br /><br />So are "Auto Suggest" and "Get Followers" scripts. If you install them, they cause YOU to like pages the script author is trying to promote, instead of getting likes FOR you. To make matters worse, many Facebook scam scripts say they are for other websites, but use your Facebook account without your knowledge.<br /><br /><br /><br /><b>Authors of highly suspicious and useless scripts are included.</b><br /><br />Scam Filter blocks authors who post blank scripts, suspicious scripts (eg. scripts that contain hidden code), and copies of other people's scripts (usually modified to include spam links). It also blocks accounts that haven't posted any scripts (yet) but are clearly operated by scammers and spammers.<br /><br /><br /><br />Scam authors periodically "update" their scripts in order to keep them near the top of the Userscripts.org list (some do this many times per day). Don't blindly trust reviews either: Scam authors post positive reviews for each other, and use phony accounts to post further positive reviews of their own scripts.<br /><br /><hr /><br />Note that <b>Ultoo.com</b> scripts that submit specific names or mobile numbers are blocked as highly suspicious, though they are not confirmed scams (testing would require an India-based mobile phone, which I don't have).</div><br /><div id="install_script"><br /></div><br /><div id="install_script"><br /></div><br /></div><br /><div id="heading"><br /></div><br /><textarea style="height: 59px; width: 450px;"><br><br /><pre class="sh_javascript sh_sourceCode" id="source"><span class="sh_comment">// <a class="zem_slink" href="<a class=" zem_slink"="" title="Hypertext Transfer Protocol" rel="wikipedia nofollow" target="_blank">http</a>://en.wikipedia.org/wiki/Relational_operator" title="Relational operator" rel="wikipedia nofollow" target="_blank">==<a class="zem_slink" href="http://www.greasespot.net/" title="Greasemonkey" rel="homepage nofollow" target="_blank">UserScript</a>==</span><br /><span class="sh_comment">// @name Userscripts.org Scam Filter</span><br /><span class="sh_comment">// @description Filters out scam scripts at Userscripts.org.</span><br /><span class="sh_comment">// @namespace http://userscripts.org/scripts/review/163038</span><br /><span class="sh_comment">// @icon http://s3.amazonaws.com/uso_ss/icon/163038/large.png?1365299642</span><br /><span class="sh_comment">// @updateURL https://userscripts.org/scripts/source/163038.meta.js</span><br /><span class="sh_comment">// @downloadURL https://userscripts.org/scripts/source/163038.user.js</span><br /><span class="sh_comment">// @homepageURL https://userscripts.org/scripts/show/163038</span><br /><span class="sh_comment">// @require https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js</span><br /><span class="sh_comment">// @include http*://userscripts.org/</span><br /><span class="sh_comment">// @include http*://userscripts.org/scripts*</span><br /><span class="sh_comment">// @include http*://userscripts.org/tags/*</span><br /><span class="sh_comment">// @grant GM_getValue</span><br /><span class="sh_comment">// @grant GM_setValue</span><br /><span class="sh_comment">// @grant GM_listValues</span><br /><span class="sh_comment">// @version 5.093</span><br /><span class="sh_comment">// ==/UserScript==</span><br /><br /><span class="sh_function">$</span><span class="sh_symbol">(</span>document<span class="sh_symbol">).</span><span class="sh_function">ready</span><span class="sh_symbol">(</span><span class="sh_keyword">function</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span><br /><br /><span class="sh_comment">// Load <a class="zem_slink" href="http://jquery.com" title="JQuery" rel="homepage nofollow" target="_blank">jQuery</a> cookie functions and viewport visibility selectors</span><br /><span class="sh_function">loadJQcookies</span><span class="sh_symbol">();</span><br /><span class="sh_function">loadJQViewport</span><span class="sh_symbol">();</span><br /><br /><span class="sh_comment">// If our settings cookies don't exist yet, create them</span><br /><span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_function">GM_getValue</span><span class="sh_symbol">(</span><span class="sh_string">'cont'</span><span class="sh_symbol">,-</span><span class="sh_number">5</span><span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_symbol">-</span><span class="sh_number">5</span><span class="sh_symbol">)</span> <span class="sh_function">GM_setValue</span><span class="sh_symbol">(</span><span class="sh_string">'cont'</span><span class="sh_symbol">,</span><span class="sh_string">'0'</span><span class="sh_symbol">);</span><br /><span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_function">GM_getValue</span><span class="sh_symbol">(</span><span class="sh_string">'update'</span><span class="sh_symbol">,-</span><span class="sh_number">5</span><span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_symbol">-</span><span class="sh_number">5</span><span class="sh_symbol">)</span> <span class="sh_function">GM_setValue</span><span class="sh_symbol">(</span><span class="sh_string">'update'</span><span class="sh_symbol">,</span><span class="sh_string">'1'</span><span class="sh_symbol">);</span><br /><br /><span class="sh_comment">// Append Settings checkboxes and set their tooltip text</span><br /><span class="sh_keyword">var</span> updateTip <span class="sh_symbol">=</span> <span class="sh_string">'Checks for Scam Filter updates a maximum of 3 times per day.'</span><span class="sh_symbol">;</span><br /><span class="sh_keyword">var</span> contTip <span class="sh_symbol">=</span> <span class="sh_string">'Automatically displays more results when you scroll to the end of a list.'</span><span class="sh_symbol">;</span><br /><br /><span class="sh_keyword">var</span> checkboxParams <span class="sh_symbol">=</span> <span class="sh_string">'type="checkbox" style="font-weight:bold;color:white;vertical-align:middle;"'</span><span class="sh_symbol">;</span><br /><span class="sh_keyword">var</span> labelParams <span class="sh_symbol">=</span> <span class="sh_string">'style="font-weight:bold;color:white;;vertical-align:middle;"'</span><span class="sh_symbol">;</span><br /><br /><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'div#top div.container'</span><span class="sh_symbol">).</span><span class="sh_function">prepend</span><span class="sh_symbol">(</span><span class="sh_string">'<div style="vertical-align:middle;font-size:11px;color:white;float:left;padding-top:4px;"><br />' <span class="sh_symbol">+</span> <br /><span class="sh_string">'<label class="filterSettingsToggle" style="cursor:pointer;color:white;font-weight:bold;">Scam Filter Settings</label>'</span> <span class="sh_symbol">+</span> <br /><span class="sh_string">'<div class="filterSettings" style="padding-bottom:3px;font-weight:bold;" hidden=""><br />' <span class="sh_symbol">+</span> <span class="sh_string">': '</span> <span class="sh_symbol">+</span><br /><span class="sh_string">'<input title="'</span> <span class=" sh_symbol"="">+</span> contTip <span class="sh_symbol">+</span> <span class="sh_string">'" class="setCont" '</span><span class="sh_symbol">+</span> checkboxParams <span class="sh_symbol">+</span><span class="sh_string">' />'</span> <span class="sh_symbol">+</span> <br /><span class="sh_string">'<label title="'</span> <span class=" sh_symbol"="">+</label></span> contTip <span class="sh_symbol">+</span> <span class="sh_string">'" class="setCont" '</span><span class="sh_symbol">+</span> labelParams <span class="sh_symbol">+</span><span class="sh_string">'>Continuous Scroll '</span> <span class="sh_symbol">+</span> <br /><span class="sh_string">'<input title="'</span> <span class=" sh_symbol"="">+</span> updateTip <span class="sh_symbol">+</span> <span class="sh_string">'" class="setUpdate" '</span><span class="sh_symbol">+</span> checkboxParams <span class="sh_symbol">+</span><span class="sh_string">' />'</span> <span class="sh_symbol">+</span> <br /><span class="sh_string">'<label title="'</span> <span class=" sh_symbol"="">+</label></span> updateTip <span class="sh_symbol">+</span> <span class="sh_string">'" class="setUpdate" '</span><span class="sh_symbol">+</span> labelParams <span class="sh_symbol">+</span><span class="sh_string">'>Update Check '</span> <span class="sh_symbol">+</span> <br /><span class="sh_comment">//'<label '="" +="" labelparams="">• v' + GM_info.script.version + ' • <span class="tally"></span> Authors Blocked</label>' +</span><br /><span class="sh_string">'<label '<="" span=""> <span class="sh_symbol">+</span> labelParams <span class="sh_symbol">+</span> <span class="sh_string">'>• <span class="tally"></span> Authors Blocked</span></label>'</span> <span class="sh_symbol">+</span><br /><span class="sh_string">'</span></div><br />'</span> <span class="sh_symbol">+</span><br /><span class="sh_string">'</span></div><br />'</span><span class="sh_symbol">);</span><br /><br /><span class="sh_comment">// Set initial state of checkboxes</span><br /><span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_function">GM_getValue</span><span class="sh_symbol">(</span><span class="sh_string">'cont'</span><span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_string">'1'</span><span class="sh_symbol">)</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'input.setCont'</span><span class="sh_symbol">).</span><span class="sh_function">prop</span><span class="sh_symbol">(</span><span class="sh_string">'checked'</span><span class="sh_symbol">,</span> <span class="sh_keyword">true</span><span class="sh_symbol">);</span><br /><span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_function">GM_getValue</span><span class="sh_symbol">(</span><span class="sh_string">'update'</span><span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_string">'1'</span><span class="sh_symbol">)</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'input.setUpdate'</span><span class="sh_symbol">).</span><span class="sh_function">prop</span><span class="sh_symbol">(</span><span class="sh_string">'checked'</span><span class="sh_symbol">,</span> <span class="sh_keyword">true</span><span class="sh_symbol">);</span><br /><br /><span class="sh_comment">// Save settings</span><br /><span class="sh_keyword">var</span> setCont<span class="sh_symbol">;</span><br /><span class="sh_keyword">var</span> setUpdate<span class="sh_symbol">;</span><br /><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'input.setCont'</span><span class="sh_symbol">).</span><span class="sh_function">change</span><span class="sh_symbol">(</span><span class="sh_keyword">function</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span>setCont <span class="sh_symbol">=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_keyword">this</span><span class="sh_symbol">).</span><span class="sh_function">prop</span><span class="sh_symbol">(</span><span class="sh_string">'checked'</span><span class="sh_symbol">)</span> <span class="sh_symbol">?</span> <span class="sh_string">'1'</span> <span class="sh_symbol">:</span> <span class="sh_string">'0'</span><span class="sh_symbol">;</span><span class="sh_function">GM_setValue</span><span class="sh_symbol">(</span><span class="sh_string">'cont'</span><span class="sh_symbol">,</span>setCont<span class="sh_symbol">);</span>location<span class="sh_symbol">.</span><span class="sh_function">reload</span><span class="sh_symbol">();</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span><br /><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'input.setUpdate'</span><span class="sh_symbol">).</span><span class="sh_function">change</span><span class="sh_symbol">(</span><span class="sh_keyword">function</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span>setUpdate <span class="sh_symbol">=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_keyword">this</span><span class="sh_symbol">).</span><span class="sh_function">prop</span><span class="sh_symbol">(</span><span class="sh_string">'checked'</span><span class="sh_symbol">)</span> <span class="sh_symbol">?</span> <span class="sh_string">'1'</span> <span class="sh_symbol">:</span> <span class="sh_string">'0'</span><span class="sh_symbol">;</span><span class="sh_function">GM_setValue</span><span class="sh_symbol">(</span><span class="sh_string">'update'</span><span class="sh_symbol">,</span>setUpdate<span class="sh_symbol">);</span>location<span class="sh_symbol">.</span><span class="sh_function">reload</span><span class="sh_symbol">();</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span><br /><br /><span class="sh_comment">// Toggle checkboxes when their labels are clicked</span><br /><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'label.setCont'</span><span class="sh_symbol">).</span><span class="sh_function">click</span><span class="sh_symbol">(</span><span class="sh_keyword">function</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span><span class="sh_function">toggleCheck</span><span class="sh_symbol">(</span><span class="sh_string">'setCont'</span><span class="sh_symbol">)</span><span class="sh_cbracket">}</span><span class="sh_symbol">);</span><br /><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'label.setUpdate'</span><span class="sh_symbol">).</span><span class="sh_function">click</span><span class="sh_symbol">(</span><span class="sh_keyword">function</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span><span class="sh_function">toggleCheck</span><span class="sh_symbol">(</span><span class="sh_string">'setUpdate'</span><span class="sh_symbol">)</span><span class="sh_cbracket">}</span><span class="sh_symbol">);</span><br /><br /><span class="sh_comment">// Toggle settings display when label is clicked</span><br /><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'label.filterSettingsToggle'</span><span class="sh_symbol">).</span><span class="sh_function">click</span><span class="sh_symbol">(</span><span class="sh_keyword">function</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span><br /> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'div.filterSettings'</span><span class="sh_symbol">).</span><span class="sh_function">attr</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">))</span><span class="sh_cbracket">{</span><br /> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'div.filterSettings'</span><span class="sh_symbol">).</span><span class="sh_function">removeAttr</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">).</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'display'</span><span class="sh_symbol">,</span><span class="sh_string">'inline'</span><span class="sh_symbol">);</span><br /> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_cbracket">{</span><br /> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'div.filterSettings'</span><span class="sh_symbol">).</span><span class="sh_function">attr</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">,</span><span class="sh_string">''</span><span class="sh_symbol">).</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'display'</span><span class="sh_symbol">,</span><span class="sh_string">''</span><span class="sh_symbol">);</span><br /> <span class="sh_cbracket">}</span><br /><span class="sh_cbracket">}</span><span class="sh_symbol">);</span><br /><br /><span class="sh_keyword">function</span> <span class="sh_function">toggleCheck</span><span class="sh_symbol">(</span>className<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><br /> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'input.'</span><span class="sh_symbol">+</span>className<span class="sh_symbol">).</span><span class="sh_function">prop</span><span class="sh_symbol">(</span><span class="sh_string">'checked'</span><span class="sh_symbol">))</span><span class="sh_cbracket">{</span><br /> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'input.'</span><span class="sh_symbol">+</span>className<span class="sh_symbol">).</span><span class="sh_function">prop</span><span class="sh_symbol">(</span><span class="sh_string">'checked'</span><span class="sh_symbol">,</span> <span class="sh_keyword">false</span><span class="sh_symbol">);</span><br /> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>className <span class="sh_symbol">==</span> <span class="sh_string">'setCont'</span><span class="sh_symbol">)</span> <span class="sh_function">GM_setValue</span><span class="sh_symbol">(</span><span class="sh_string">'cont'</span><span class="sh_symbol">,</span><span class="sh_string">'0'</span><span class="sh_symbol">);</span><br /> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>className <span class="sh_symbol">==</span> <span class="sh_string">'setUpdate'</span><span class="sh_symbol">)</span> <span class="sh_function">GM_setValue</span><span class="sh_symbol">(</span><span class="sh_string">'update'</span><span class="sh_symbol">,</span><span class="sh_string">'0'</span><span class="sh_symbol">);</span><br /> location<span class="sh_symbol">.</span><span class="sh_function">reload</span><span class="sh_symbol">();</span><br /> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_cbracket">{</span><br /> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'input.'</span><span class="sh_symbol">+</span>className<span class="sh_symbol">).</span><span class="sh_function">prop</span><span class="sh_symbol">(</span><span class="sh_string">'checked'</span><span class="sh_symbol">,</span> <span class="sh_keyword">true</span><span class="sh_symbol">);</span><br /> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>className <span class="sh_symbol">==</span> <span class="sh_string">'setCont'</span><span class="sh_symbol">)</span> <span class="sh_function">GM_setValue</span><span class="sh_symbol">(</span><span class="sh_string">'cont'</span><span class="sh_symbol">,</span><span class="sh_string">'1'</span><span class="sh_symbol">);</span><br /> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>className <span class="sh_symbol">==</span> <span class="sh_string">'setUpdate'</span><span class="sh_symbol">)</span> <span class="sh_function">GM_setValue</span><span class="sh_symbol">(</span><span class="sh_string">'update'</span><span class="sh_symbol">,</span><span class="sh_string">'1'</span><span class="sh_symbol">);</span><br /> location<span class="sh_symbol">.</span><span class="sh_function">reload</span><span class="sh_symbol">();</span><br /> <span class="sh_cbracket">}</span><br /><span class="sh_cbracket">}</span><br /><br /><span class="sh_comment">// Read settings</span><br /><span class="sh_keyword">var</span> cCont <span class="sh_symbol">=</span> <span class="sh_symbol">(</span><span class="sh_function">GM_getValue</span><span class="sh_symbol">(</span><span class="sh_string">'cont'</span><span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_string">'1'</span><span class="sh_symbol">)</span> <span class="sh_symbol">?</span> <span class="sh_keyword">true</span> <span class="sh_symbol">:</span> <span class="sh_keyword">false</span><span class="sh_symbol">;</span><br /><span class="sh_keyword">var</span> cUpdate <span class="sh_symbol">=</span> <span class="sh_symbol">(</span><span class="sh_function">GM_getValue</span><span class="sh_symbol">(</span><span class="sh_string">'update'</span><span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_string">'1'</span><span class="sh_symbol">)</span> <span class="sh_symbol">?</span> <span class="sh_keyword">true</span> <span class="sh_symbol">:</span> <span class="sh_keyword">false</span><span class="sh_symbol">;</span><br /><br /><span class="sh_comment">// *** Set update info ***</span><br /><br /><span class="sh_comment">// Tell auto-updater this script's description page URL, for the update notification link</span><br /><span class="sh_keyword">var</span> thisScriptURL <span class="sh_symbol">=</span> location<span class="sh_symbol">.</span>protocol <span class="sh_symbol">+</span> <span class="sh_string">'//userscripts.org/scripts/show/163038'</span><span class="sh_symbol">;</span> <br /><br /><span class="sh_comment">// Tell auto-updater this script's meta data URL, for checking the script's latest version number</span><br /><span class="sh_keyword">var</span> thisScriptMetaURL <span class="sh_symbol">=</span> location<span class="sh_symbol">.</span>protocol <span class="sh_symbol">+</span> <span class="sh_string">'//userscripts.org/scripts/source/163038.meta.js'</span><span class="sh_symbol">;</span> <br /><br /><span class="sh_comment">// *** End update info ***</span><br /><br /><span class="sh_comment">// ********************* Continuous scroll **********************</span><br /><span class="sh_keyword">if</span> <span class="sh_symbol">((</span>cCont<span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.loading.done'</span><span class="sh_symbol">).</span>length <span class="sh_symbol"><</span> <span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/show'</span><span class="sh_symbol">)</span> <span class="sh_symbol"><</span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/review'</span><span class="sh_symbol">)</span> <span class="sh_symbol"><</span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/fans'</span><span class="sh_symbol">)</span> <span class="sh_symbol"><</span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/issues'</span><span class="sh_symbol">)</span> <span class="sh_symbol"><</span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/discuss'</span><span class="sh_symbol">)</span> <span class="sh_symbol"><</span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname <span class="sh_symbol">!=</span> <span class="sh_string">'/'</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/review'</span><span class="sh_symbol">)</span> <span class="sh_symbol"><</span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/versions'</span><span class="sh_symbol">)</span> <span class="sh_symbol"><</span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/diff'</span><span class="sh_symbol">)</span> <span class="sh_symbol"><</span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/upload'</span><span class="sh_symbol">)</span> <span class="sh_symbol"><</span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/admin'</span><span class="sh_symbol">)</span> <span class="sh_symbol"><</span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/edit'</span><span class="sh_symbol">)</span> <span class="sh_symbol"><</span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/images'</span><span class="sh_symbol">)</span> <span class="sh_symbol"><</span> <span class="sh_number">0</span><span class="sh_symbol">))</span><span class="sh_cbracket">{</span><br /><br /> <span class="sh_comment">// Remove the page links to avoid confusion in continuous mode </span><br /> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'div.pagination'</span><span class="sh_symbol">).</span><span class="sh_function">remove</span><span class="sh_symbol">();</span><br /> <br /> <span class="sh_keyword">var</span> pageOffset <span class="sh_symbol">=</span> <span class="sh_number">0</span><span class="sh_symbol">;</span><br /> <br /> <span class="sh_comment">// Get the current page number</span><br /> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>href<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'page='</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span><br /> <span class="sh_comment">// If the URL contains page=, read page number from there</span><br /> <span class="sh_keyword">var</span> page <span class="sh_symbol">=</span> <span class="sh_function">parseInt</span><span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>href<span class="sh_symbol">.</span><span class="sh_function">substr</span><span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>href<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'page='</span><span class="sh_symbol">)</span> <span class="sh_symbol">+</span> <span class="sh_number">5</span><span class="sh_symbol">,</span><span class="sh_number">4</span><span class="sh_symbol">));</span><br /> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_cbracket">{</span><br /> <span class="sh_comment">// Otherwise assume we're on page 1</span><br /> <span class="sh_keyword">var</span> page <span class="sh_symbol">=</span> <span class="sh_number">1</span><span class="sh_symbol">;</span><br /> <span class="sh_cbracket">}</span><br /><br /> <span class="sh_comment">// Clone the table header for use in our "floater" fixed info bar</span><br /> <span class="sh_keyword">var</span> info <span class="sh_symbol">=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'table.wide.forums th.la'</span><span class="sh_symbol">).</span><span class="sh_function">clone</span><span class="sh_symbol">();</span><br /> info<span class="sh_symbol">.</span><span class="sh_function">addClass</span><span class="sh_symbol">(</span><span class="sh_string">'floated'</span><span class="sh_symbol">);</span><br /> <br /> <span class="sh_comment">// Create a div and table to contain the cloned table header </span><br /> <span class="sh_keyword">var</span> floater <span class="sh_symbol">=</span> <span class="sh_string">'<div style="width:950px;position:fixed;left: 50%;margin-left:-475px;z-index:50;" class="floater" hidden=""><br /><br />'<span class="sh_symbol">;</span><span class="sh_comment">// Insert the floater div into the page...</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'body'</span><span class="sh_symbol">).</span><span class="sh_function">prepend</span><span class="sh_symbol">(</span>floater<span class="sh_symbol">);</span><span class="sh_comment">// ...and insert the cloned table header into that div</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'.floater table'</span><span class="sh_symbol">).</span><span class="sh_function">prepend</span><span class="sh_symbol">(</span>info<span class="sh_symbol">);</span><span class="sh_comment">// Hide or show the floater based on whether or not the original table header is in view (:in-viewport selector from a plugin)</span><span class="sh_keyword">if</span><span class="sh_symbol">((</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'table.wide.forums th.la:not(.floated):in-viewport'</span><span class="sh_symbol">).</span>length <span class="sh_symbol"><</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_symbol">&&</span><span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'.floater[hidden]'</span><span class="sh_symbol">).</span>length <span class="sh_symbol">></span><span class="sh_number">0</span><span class="sh_symbol">))</span><span class="sh_cbracket">{</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'.floater'</span><span class="sh_symbol">).</span><span class="sh_function">removeAttr</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">);</span><span class="sh_cbracket">}</span><span class="sh_keyword">else</span><span class="sh_keyword">if</span><span class="sh_symbol">((</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'table.wide.forums th.la:not(.floated):in-viewport'</span><span class="sh_symbol">).</span>length <span class="sh_symbol">></span><span class="sh_number">0</span><span class="sh_symbol">)</span><span class="sh_symbol">&&</span><span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'.floater[hidden]'</span><span class="sh_symbol">).</span>length <span class="sh_symbol"><</span><span class="sh_number">1</span><span class="sh_symbol">))</span><span class="sh_cbracket">{</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'.floater'</span><span class="sh_symbol">).</span><span class="sh_function">attr</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">,</span><span class="sh_string">''</span><span class="sh_symbol">);</span><span class="sh_cbracket">}</span><span class="sh_comment">// Scrolling should trigger a check to see if the floater needs to be shown, and whether we need to fetch more content</span><span class="sh_function">$</span><span class="sh_symbol">(</span>window<span class="sh_symbol">).</span><span class="sh_function">scroll</span><span class="sh_symbol">(</span><span class="sh_keyword">function</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span><span class="sh_function">scroll</span><span class="sh_symbol">();</span><span class="sh_cbracket">}</span><span class="sh_symbol">);</span><span class="sh_cbracket">}</span><span class="sh_keyword">function</span><span class="sh_function">scroll</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span><span class="sh_comment">// Again, hide or show the floater as appropriate</span><span class="sh_keyword">if</span><span class="sh_symbol">((</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'table.wide.forums th.la:not(.floated):in-viewport'</span><span class="sh_symbol">).</span>length <span class="sh_symbol"><</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_symbol">&&</span><span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'.floater[hidden]'</span><span class="sh_symbol">).</span>length <span class="sh_symbol">></span><span class="sh_number">0</span><span class="sh_symbol">))</span><span class="sh_cbracket">{</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'.floater'</span><span class="sh_symbol">).</span><span class="sh_function">removeAttr</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">);</span><span class="sh_cbracket">}</span><span class="sh_keyword">else</span><span class="sh_keyword">if</span><span class="sh_symbol">((</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'table.wide.forums th.la:not(.floated):in-viewport'</span><span class="sh_symbol">).</span>length <span class="sh_symbol">></span><span class="sh_number">0</span><span class="sh_symbol">)</span><span class="sh_symbol">&&</span><span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'.floater[hidden]'</span><span class="sh_symbol">).</span>length <span class="sh_symbol"><</span><span class="sh_number">1</span><span class="sh_symbol">))</span><span class="sh_cbracket">{</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'.floater'</span><span class="sh_symbol">).</span><span class="sh_function">attr</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">,</span><span class="sh_string">''</span><span class="sh_symbol">);</span><span class="sh_cbracket">}</span><span class="sh_comment">// If the page footer is in view, we've hit the bottom of the page, so fetch more content...</span><span class="sh_keyword">if</span><span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'div#root_footer:in-viewport'</span><span class="sh_symbol">).</span>length <span class="sh_symbol">></span><span class="sh_number">0</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_comment">// ...But don't fetch more content if a fetch is already in progress</span><span class="sh_keyword">if</span><span class="sh_symbol">(!(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'table.wide.forums tbody.active'</span><span class="sh_symbol">).</span>length <span class="sh_symbol">></span><span class="sh_number">0</span><span class="sh_symbol">))</span><span class="sh_cbracket">{</span><span class="sh_comment">// Tell upcoming scroll triggers that a fetch is in progress</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'table.wide.forums tbody'</span><span class="sh_symbol">).</span><span class="sh_function">addClass</span><span class="sh_symbol">(</span><span class="sh_string">'active'</span><span class="sh_symbol">);</span><span class="sh_comment">// Keep track of which results page we're up to</span> pageOffset<span class="sh_symbol">++;</span><span class="sh_keyword">var</span> nextPage <span class="sh_symbol">=</span> page <span class="sh_symbol">+</span> pageOffset<span class="sh_symbol">;</span><span class="sh_comment">// Start constructing the URL to fetch. Strip out any anchor data from the current URL</span><span class="sh_keyword">var</span> urlFixed <span class="sh_symbol">=</span> location<span class="sh_symbol">.</span>href<span class="sh_symbol">.</span><span class="sh_function">replace</span><span class="sh_symbol">(</span><span class="sh_regexp">/\#.*/i</span><span class="sh_symbol">,</span><span class="sh_string">''</span><span class="sh_symbol">);</span><span class="sh_comment">// Set the URL to fetch the next page. Must be done in different ways depending on the current URL's tokens</span><span class="sh_keyword">if</span><span class="sh_symbol">(</span>urlFixed<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/page\=/i</span><span class="sh_symbol">)</span><span class="sh_symbol">></span><span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> nextUrl <span class="sh_symbol">=</span> urlFixed<span class="sh_symbol">.</span><span class="sh_function">replace</span><span class="sh_symbol">(</span><span class="sh_regexp">/page\=\d+/i</span><span class="sh_symbol">,</span><span class="sh_string">'page='</span><span class="sh_symbol">+</span> nextPage<span class="sh_symbol">);</span><span class="sh_cbracket">}</span><span class="sh_keyword">else</span><span class="sh_keyword">if</span><span class="sh_symbol">(</span>urlFixed<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/\?/</span><span class="sh_symbol">)</span><span class="sh_symbol">></span><span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> nextUrl <span class="sh_symbol">=</span> urlFixed <span class="sh_symbol">+</span><span class="sh_string">'&page='</span><span class="sh_symbol">+</span> nextPage<span class="sh_symbol">;</span><span class="sh_cbracket">}</span><span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> nextUrl <span class="sh_symbol">=</span> urlFixed <span class="sh_symbol">+</span><span class="sh_string">'?page='</span><span class="sh_symbol">+</span> nextPage<span class="sh_symbol">;</span><span class="sh_cbracket">}</span><span class="sh_comment">// Display "Fetching" message</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.loading'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">(</span><span class="sh_string">' [Fetching More Results...]'</span><span class="sh_symbol">).</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'color'</span><span class="sh_symbol">,</span><span class="sh_string">'lightblue'</span><span class="sh_symbol">);</span><span class="sh_comment">// Retrieve the next page</span> $<span class="sh_symbol">.</span><span class="sh_function">ajax</span><span class="sh_symbol">(</span><span class="sh_cbracket">{</span> url<span class="sh_symbol">:</span> nextUrl<span class="sh_symbol">,</span> dataType<span class="sh_symbol">:</span><span class="sh_string">'html'</span><span class="sh_symbol">,</span><span class="sh_comment">//async: false,</span> success<span class="sh_symbol">:</span> addContent <span class="sh_cbracket">}</span><span class="sh_symbol">);</span><span class="sh_cbracket">}</span><span class="sh_cbracket">}</span><span class="sh_cbracket">}</span><span class="sh_keyword">function</span><span class="sh_function">addContent</span><span class="sh_symbol">(</span>data<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">if</span><span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'No results. Sorry!'</span><span class="sh_symbol">)</span><span class="sh_symbol">></span><span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.loading'</span><span class="sh_symbol">).</span><span class="sh_function">addClass</span><span class="sh_symbol">(</span><span class="sh_string">'done'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">(</span><span class="sh_string">' No more results!'</span><span class="sh_symbol">);</span><span class="sh_cbracket">}</span><span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_comment">// From the retrieved page, strip out everything above and below the rows of the results table</span><span class="sh_keyword">var</span> newData <span class="sh_symbol">=</span> data<span class="sh_symbol">.</span><span class="sh_function">replace</span><span class="sh_symbol">(</span><span class="sh_regexp">/\!DOCTYPE[\s\S]*?\<br /></span><span class="sh_specialchar">\'</span><span class="sh_string">scripts-'</span><span class="sh_symbol">)</span><span class="sh_symbol">.</span><span class="sh_function">replace</span><span class="sh_symbol">(</span><span class="sh_regexp">/\<\/table\>[\s\S]*\<div class\="pagination[\s\S]*\<\/html\><br />/i</span><span class=" sh_symbol"="">,<span class="sh_string">''</span><span class="sh_symbol">);</span> <span class="sh_comment">// Debug new table row extraction</span> <span class="sh_comment">//document.open('text/plain');document.write(newData);</span> <span class="sh_comment">// Append the new table rows to our current table</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'table.wide.forums tbody'</span><span class="sh_symbol">).</span><span class="sh_function">append</span><span class="sh_symbol">(</span>newData<span class="sh_symbol">);</span> <span class="sh_comment">// Tell upcoming scroll triggers that a fetch is no longer in progress</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'table.wide.forums tbody'</span><span class="sh_symbol">).</span><span class="sh_function">removeClass</span><span class="sh_symbol">(</span><span class="sh_string">'active'</span><span class="sh_symbol">);</span> <span class="sh_comment">// Clear "Fetching" text</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.loading'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">(</span><span class="sh_string">''</span><span class="sh_symbol">);</span> <span class="sh_comment">// Run the filter again to check for scams in the new content</span> <span class="sh_function">filter</span><span class="sh_symbol">();</span> <span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_comment">// ************************* End Continuous **********************</span> <span class="sh_comment">/* The following 5 arrays comprise the blacklist. They are divided by type for possible future auto-review features.</span> <span class="sh_comment">Note that clear scammers are placed in the Scammers array, even if they might fit one of the other categories. */</span> <span class="sh_comment">// IDs of known scam/spam authors</span> <span class="sh_keyword">var</span> scammers <span class="sh_symbol">=</span> <span class="sh_symbol">[</span> <span class="sh_number">505511</span><span class="sh_symbol">,</span><span class="sh_number">509293</span><span class="sh_symbol">,</span><span class="sh_number">509378</span><span class="sh_symbol">,</span><span class="sh_number">510850</span><span class="sh_symbol">,</span><span class="sh_number">513541</span><span class="sh_symbol">,</span><span class="sh_number">510672</span><span class="sh_symbol">,</span><span class="sh_number">480097</span><span class="sh_symbol">,</span><span class="sh_number">510116</span><span class="sh_symbol">,</span><span class="sh_number">500038</span><span class="sh_symbol">,</span><span class="sh_number">512571</span><span class="sh_symbol">,</span><span class="sh_number">442265</span><span class="sh_symbol">,</span><span class="sh_number">513430</span><span class="sh_symbol">,</span><span class="sh_number">507472</span><span class="sh_symbol">,</span><span class="sh_number">513409</span><span class="sh_symbol">,</span><span class="sh_number">505429</span><span class="sh_symbol">,</span> <span class="sh_number">513357</span><span class="sh_symbol">,</span><span class="sh_number">512124</span><span class="sh_symbol">,</span><span class="sh_number">507498</span><span class="sh_symbol">,</span><span class="sh_number">506735</span><span class="sh_symbol">,</span><span class="sh_number">500300</span><span class="sh_symbol">,</span><span class="sh_number">511244</span><span class="sh_symbol">,</span><span class="sh_number">510309</span><span class="sh_symbol">,</span><span class="sh_number">511328</span><span class="sh_symbol">,</span><span class="sh_number">497384</span><span class="sh_symbol">,</span><span class="sh_number">513364</span><span class="sh_symbol">,</span><span class="sh_number">513355</span><span class="sh_symbol">,</span><span class="sh_number">511676</span><span class="sh_symbol">,</span><span class="sh_number">487511</span><span class="sh_symbol">,</span><span class="sh_number">511415</span><span class="sh_symbol">,</span><span class="sh_number">507901</span><span class="sh_symbol">,</span> <span class="sh_number">507089</span><span class="sh_symbol">,</span><span class="sh_number">513264</span><span class="sh_symbol">,</span><span class="sh_number">510605</span><span class="sh_symbol">,</span><span class="sh_number">512529</span><span class="sh_symbol">,</span><span class="sh_number">511674</span><span class="sh_symbol">,</span><span class="sh_number">511989</span><span class="sh_symbol">,</span><span class="sh_number">510527</span><span class="sh_symbol">,</span><span class="sh_number">512972</span><span class="sh_symbol">,</span><span class="sh_number">513188</span><span class="sh_symbol">,</span><span class="sh_number">512212</span><span class="sh_symbol">,</span><span class="sh_number">509425</span><span class="sh_symbol">,</span><span class="sh_number">512669</span><span class="sh_symbol">,</span><span class="sh_number">512668</span><span class="sh_symbol">,</span><span class="sh_number">512519</span><span class="sh_symbol">,</span><span class="sh_number">472464</span><span class="sh_symbol">,</span> <span class="sh_number">513030</span><span class="sh_symbol">,</span><span class="sh_number">508237</span><span class="sh_symbol">,</span><span class="sh_number">509455</span><span class="sh_symbol">,</span><span class="sh_number">445861</span><span class="sh_symbol">,</span><span class="sh_number">505765</span><span class="sh_symbol">,</span><span class="sh_number">505775</span><span class="sh_symbol">,</span><span class="sh_number">490174</span><span class="sh_symbol">,</span><span class="sh_number">505107</span><span class="sh_symbol">,</span><span class="sh_number">504907</span><span class="sh_symbol">,</span><span class="sh_number">475448</span><span class="sh_symbol">,</span><span class="sh_number">439139</span><span class="sh_symbol">,</span><span class="sh_number">489768</span><span class="sh_symbol">,</span><span class="sh_number">427958</span><span class="sh_symbol">,</span><span class="sh_number">500250</span><span class="sh_symbol">,</span><span class="sh_number">475874</span><span class="sh_symbol">,</span> <span class="sh_number">500010</span><span class="sh_symbol">,</span><span class="sh_number">501687</span><span class="sh_symbol">,</span><span class="sh_number">441113</span><span class="sh_symbol">,</span><span class="sh_number">477783</span><span class="sh_symbol">,</span><span class="sh_number">477939</span><span class="sh_symbol">,</span><span class="sh_number">469787</span><span class="sh_symbol">,</span><span class="sh_number">480448</span><span class="sh_symbol">,</span><span class="sh_number">490444</span><span class="sh_symbol">,</span><span class="sh_number">507032</span><span class="sh_symbol">,</span><span class="sh_number">507280</span><span class="sh_symbol">,</span><span class="sh_number">506308</span><span class="sh_symbol">,</span><span class="sh_number">511070</span><span class="sh_symbol">,</span><span class="sh_number">414793</span><span class="sh_symbol">,</span><span class="sh_number">512674</span><span class="sh_symbol">,</span><span class="sh_number">510630</span><span class="sh_symbol">,</span> <span class="sh_number">507732</span><span class="sh_symbol">,</span><span class="sh_number">510588</span><span class="sh_symbol">,</span><span class="sh_number">512779</span><span class="sh_symbol">,</span><span class="sh_number">512759</span><span class="sh_symbol">,</span><span class="sh_number">512752</span><span class="sh_symbol">,</span><span class="sh_number">512179</span><span class="sh_symbol">,</span><span class="sh_number">512061</span><span class="sh_symbol">,</span><span class="sh_number">512725</span><span class="sh_symbol">,</span><span class="sh_number">500430</span><span class="sh_symbol">,</span><span class="sh_number">505802</span><span class="sh_symbol">,</span><span class="sh_number">378054</span><span class="sh_symbol">,</span><span class="sh_number">509405</span><span class="sh_symbol">,</span><span class="sh_number">510729</span><span class="sh_symbol">,</span><span class="sh_number">100713</span><span class="sh_symbol">,</span><span class="sh_number">510389</span><span class="sh_symbol">,</span> <span class="sh_number">504342</span><span class="sh_symbol">,</span><span class="sh_number">512514</span><span class="sh_symbol">,</span><span class="sh_number">506181</span><span class="sh_symbol">,</span><span class="sh_number">509046</span><span class="sh_symbol">,</span><span class="sh_number">512362</span><span class="sh_symbol">,</span><span class="sh_number">511138</span><span class="sh_symbol">,</span><span class="sh_number">511847</span><span class="sh_symbol">,</span><span class="sh_number">512226</span><span class="sh_symbol">,</span><span class="sh_number">511439</span><span class="sh_symbol">,</span><span class="sh_number">511386</span><span class="sh_symbol">,</span><span class="sh_number">509806</span><span class="sh_symbol">,</span><span class="sh_number">512154</span><span class="sh_symbol">,</span><span class="sh_number">510785</span><span class="sh_symbol">,</span><span class="sh_number">502394</span><span class="sh_symbol">,</span><span class="sh_number">513843</span><span class="sh_symbol">,</span> <span class="sh_number">511333</span><span class="sh_symbol">,</span><span class="sh_number">511604</span><span class="sh_symbol">,</span><span class="sh_number">511998</span><span class="sh_symbol">,</span><span class="sh_number">511984</span><span class="sh_symbol">,</span><span class="sh_number">505329</span><span class="sh_symbol">,</span><span class="sh_number">471739</span><span class="sh_symbol">,</span><span class="sh_number">511959</span><span class="sh_symbol">,</span><span class="sh_number">497739</span><span class="sh_symbol">,</span><span class="sh_number">508301</span><span class="sh_symbol">,</span><span class="sh_number">496647</span><span class="sh_symbol">,</span><span class="sh_number">511856</span><span class="sh_symbol">,</span><span class="sh_number">511598</span><span class="sh_symbol">,</span><span class="sh_number">511852</span><span class="sh_symbol">,</span><span class="sh_number">508789</span><span class="sh_symbol">,</span><span class="sh_number">509003</span><span class="sh_symbol">,</span> <span class="sh_number">511640</span><span class="sh_symbol">,</span><span class="sh_number">506401</span><span class="sh_symbol">,</span><span class="sh_number">511558</span><span class="sh_symbol">,</span><span class="sh_number">511543</span><span class="sh_symbol">,</span><span class="sh_number">510077</span><span class="sh_symbol">,</span><span class="sh_number">506307</span><span class="sh_symbol">,</span><span class="sh_number">511319</span><span class="sh_symbol">,</span><span class="sh_number">511367</span><span class="sh_symbol">,</span><span class="sh_number">511401</span><span class="sh_symbol">,</span><span class="sh_number">426758</span><span class="sh_symbol">,</span><span class="sh_number">511160</span><span class="sh_symbol">,</span><span class="sh_number">505130</span><span class="sh_symbol">,</span><span class="sh_number">511129</span><span class="sh_symbol">,</span><span class="sh_number">500403</span><span class="sh_symbol">,</span><span class="sh_number">511060</span><span class="sh_symbol">,</span> <span class="sh_number">511004</span><span class="sh_symbol">,</span><span class="sh_number">510975</span><span class="sh_symbol">,</span><span class="sh_number">509376</span><span class="sh_symbol">,</span><span class="sh_number">510881</span><span class="sh_symbol">,</span><span class="sh_number">508826</span><span class="sh_symbol">,</span><span class="sh_number">510788</span><span class="sh_symbol">,</span><span class="sh_number">510790</span><span class="sh_symbol">,</span><span class="sh_number">510609</span><span class="sh_symbol">,</span><span class="sh_number">510487</span><span class="sh_symbol">,</span><span class="sh_number">510565</span><span class="sh_symbol">,</span><span class="sh_number">504495</span><span class="sh_symbol">,</span><span class="sh_number">507700</span><span class="sh_symbol">,</span><span class="sh_number">474473</span><span class="sh_symbol">,</span><span class="sh_number">508083</span><span class="sh_symbol">,</span><span class="sh_number">508770</span><span class="sh_symbol">,</span> <span class="sh_number">436783</span><span class="sh_symbol">,</span><span class="sh_number">503959</span><span class="sh_symbol">,</span><span class="sh_number">501839</span><span class="sh_symbol">,</span><span class="sh_number">508952</span><span class="sh_symbol">,</span><span class="sh_number">510181</span><span class="sh_symbol">,</span><span class="sh_number">510183</span><span class="sh_symbol">,</span><span class="sh_number">496061</span><span class="sh_symbol">,</span><span class="sh_number">502509</span><span class="sh_symbol">,</span><span class="sh_number">434378</span><span class="sh_symbol">,</span><span class="sh_number">319859</span><span class="sh_symbol">,</span><span class="sh_number">509709</span><span class="sh_symbol">,</span><span class="sh_number">445145</span><span class="sh_symbol">,</span><span class="sh_number">506323</span><span class="sh_symbol">,</span><span class="sh_number">509541</span><span class="sh_symbol">,</span><span class="sh_number">509477</span><span class="sh_symbol">,</span> <span class="sh_number">509401</span><span class="sh_symbol">,</span><span class="sh_number">509102</span><span class="sh_symbol">,</span><span class="sh_number">507765</span><span class="sh_symbol">,</span><span class="sh_number">440600</span><span class="sh_symbol">,</span><span class="sh_number">507395</span><span class="sh_symbol">,</span><span class="sh_number">493603</span><span class="sh_symbol">,</span><span class="sh_number">469852</span><span class="sh_symbol">,</span><span class="sh_number">504611</span><span class="sh_symbol">,</span><span class="sh_number">508929</span><span class="sh_symbol">,</span><span class="sh_number">504955</span><span class="sh_symbol">,</span><span class="sh_number">508885</span><span class="sh_symbol">,</span><span class="sh_number">507596</span><span class="sh_symbol">,</span><span class="sh_number">492463</span><span class="sh_symbol">,</span><span class="sh_number">508839</span><span class="sh_symbol">,</span><span class="sh_number">502511</span><span class="sh_symbol">,</span> <span class="sh_number">505519</span><span class="sh_symbol">,</span><span class="sh_number">507645</span><span class="sh_symbol">,</span><span class="sh_number">508665</span><span class="sh_symbol">,</span><span class="sh_number">507767</span><span class="sh_symbol">,</span><span class="sh_number">508322</span><span class="sh_symbol">,</span><span class="sh_number">507927</span><span class="sh_symbol">,</span><span class="sh_number">508149</span><span class="sh_symbol">,</span><span class="sh_number">505864</span><span class="sh_symbol">,</span><span class="sh_number">508437</span><span class="sh_symbol">,</span><span class="sh_number">506372</span><span class="sh_symbol">,</span><span class="sh_number">501446</span><span class="sh_symbol">,</span><span class="sh_number">507756</span><span class="sh_symbol">,</span><span class="sh_number">479455</span><span class="sh_symbol">,</span><span class="sh_number">508339</span><span class="sh_symbol">,</span><span class="sh_number">508327</span><span class="sh_symbol">,</span> <span class="sh_number">508228</span><span class="sh_symbol">,</span><span class="sh_number">508224</span><span class="sh_symbol">,</span><span class="sh_number">439396</span><span class="sh_symbol">,</span><span class="sh_number">486100</span><span class="sh_symbol">,</span><span class="sh_number">484490</span><span class="sh_symbol">,</span><span class="sh_number">483252</span><span class="sh_symbol">,</span><span class="sh_number">477018</span><span class="sh_symbol">,</span><span class="sh_number">469610</span><span class="sh_symbol">,</span><span class="sh_number">474749</span><span class="sh_symbol">,</span><span class="sh_number">475548</span><span class="sh_symbol">,</span><span class="sh_number">469791</span><span class="sh_symbol">,</span><span class="sh_number">471187</span><span class="sh_symbol">,</span><span class="sh_number">469618</span><span class="sh_symbol">,</span><span class="sh_number">469741</span><span class="sh_symbol">,</span><span class="sh_number">469778</span><span class="sh_symbol">,</span> <span class="sh_number">469780</span><span class="sh_symbol">,</span><span class="sh_number">469784</span><span class="sh_symbol">,</span><span class="sh_number">469809</span><span class="sh_symbol">,</span><span class="sh_number">469886</span><span class="sh_symbol">,</span><span class="sh_number">428875</span><span class="sh_symbol">,</span><span class="sh_number">464299</span><span class="sh_symbol">,</span><span class="sh_number">440810</span><span class="sh_symbol">,</span><span class="sh_number">442036</span><span class="sh_symbol">,</span><span class="sh_number">238348</span><span class="sh_symbol">,</span><span class="sh_number">441298</span><span class="sh_symbol">,</span><span class="sh_number">440800</span><span class="sh_symbol">,</span><span class="sh_number">441085</span><span class="sh_symbol">,</span><span class="sh_number">437719</span><span class="sh_symbol">,</span><span class="sh_number">420155</span><span class="sh_symbol">,</span><span class="sh_number">409280</span><span class="sh_symbol">,</span> <span class="sh_number">403145</span><span class="sh_symbol">,</span><span class="sh_number">342242</span><span class="sh_symbol">,</span><span class="sh_number">329565</span><span class="sh_symbol">,</span><span class="sh_number">139742</span><span class="sh_symbol">,</span><span class="sh_number">511861</span><span class="sh_symbol">,</span><span class="sh_number">314407</span><span class="sh_symbol">,</span><span class="sh_number">473973</span><span class="sh_symbol">,</span><span class="sh_number">322218</span><span class="sh_symbol">,</span><span class="sh_number">503485</span><span class="sh_symbol">,</span><span class="sh_number">471931</span><span class="sh_symbol">,</span><span class="sh_number">502003</span><span class="sh_symbol">,</span><span class="sh_number">353460</span><span class="sh_symbol">,</span><span class="sh_number">507208</span><span class="sh_symbol">,</span><span class="sh_number">512693</span><span class="sh_symbol">,</span><span class="sh_number">501361</span><span class="sh_symbol">,</span> <span class="sh_number">512259</span><span class="sh_symbol">,</span><span class="sh_number">511888</span><span class="sh_symbol">,</span><span class="sh_number">511170</span><span class="sh_symbol">,</span><span class="sh_number">511127</span><span class="sh_symbol">,</span><span class="sh_number">291772</span><span class="sh_symbol">,</span><span class="sh_number">510918</span><span class="sh_symbol">,</span><span class="sh_number">503054</span><span class="sh_symbol">,</span><span class="sh_number">510750</span><span class="sh_symbol">,</span><span class="sh_number">510611</span><span class="sh_symbol">,</span><span class="sh_number">509950</span><span class="sh_symbol">,</span><span class="sh_number">427026</span><span class="sh_symbol">,</span><span class="sh_number">507649</span><span class="sh_symbol">,</span><span class="sh_number">507934</span><span class="sh_symbol">,</span><span class="sh_number">508452</span><span class="sh_symbol">,</span><span class="sh_number">471736</span><span class="sh_symbol">,</span> <span class="sh_number">507729</span><span class="sh_symbol">,</span><span class="sh_number">507614</span><span class="sh_symbol">,</span><span class="sh_number">507751</span><span class="sh_symbol">,</span><span class="sh_number">507753</span><span class="sh_symbol">,</span><span class="sh_number">508147</span><span class="sh_symbol">,</span><span class="sh_number">507588</span><span class="sh_symbol">,</span><span class="sh_number">507142</span><span class="sh_symbol">,</span><span class="sh_number">492379</span><span class="sh_symbol">,</span><span class="sh_number">507486</span><span class="sh_symbol">,</span><span class="sh_number">507485</span><span class="sh_symbol">,</span><span class="sh_number">508087</span><span class="sh_symbol">,</span><span class="sh_number">507183</span><span class="sh_symbol">,</span><span class="sh_number">479194</span><span class="sh_symbol">,</span><span class="sh_number">507094</span><span class="sh_symbol">,</span><span class="sh_number">507093</span><span class="sh_symbol">,</span> <span class="sh_number">507082</span><span class="sh_symbol">,</span><span class="sh_number">499556</span><span class="sh_symbol">,</span><span class="sh_number">507041</span><span class="sh_symbol">,</span><span class="sh_number">507861</span><span class="sh_symbol">,</span><span class="sh_number">507870</span><span class="sh_symbol">,</span><span class="sh_number">507861</span><span class="sh_symbol">,</span><span class="sh_number">507870</span><span class="sh_symbol">,</span><span class="sh_number">426361</span><span class="sh_symbol">,</span><span class="sh_number">506908</span><span class="sh_symbol">,</span><span class="sh_number">506898</span><span class="sh_symbol">,</span><span class="sh_number">506748</span><span class="sh_symbol">,</span><span class="sh_number">505764</span><span class="sh_symbol">,</span><span class="sh_number">506542</span><span class="sh_symbol">,</span><span class="sh_number">506547</span><span class="sh_symbol">,</span><span class="sh_number">507776</span><span class="sh_symbol">,</span> <span class="sh_number">506324</span><span class="sh_symbol">,</span><span class="sh_number">428623</span><span class="sh_symbol">,</span><span class="sh_number">507651</span><span class="sh_symbol">,</span><span class="sh_number">507659</span><span class="sh_symbol">,</span><span class="sh_number">506107</span><span class="sh_symbol">,</span><span class="sh_number">271918</span><span class="sh_symbol">,</span><span class="sh_number">504188</span><span class="sh_symbol">,</span><span class="sh_number">507554</span><span class="sh_symbol">,</span><span class="sh_number">505267</span><span class="sh_symbol">,</span><span class="sh_number">506223</span><span class="sh_symbol">,</span><span class="sh_number">507471</span><span class="sh_symbol">,</span><span class="sh_number">504831</span><span class="sh_symbol">,</span><span class="sh_number">290748</span><span class="sh_symbol">,</span><span class="sh_number">503800</span><span class="sh_symbol">,</span><span class="sh_number">507340</span><span class="sh_symbol">,</span> <span class="sh_number">507232</span><span class="sh_symbol">,</span><span class="sh_number">342061</span><span class="sh_symbol">,</span><span class="sh_number">468969</span><span class="sh_symbol">,</span><span class="sh_number">507199</span><span class="sh_symbol">,</span><span class="sh_number">507215</span><span class="sh_symbol">,</span><span class="sh_number">507166</span><span class="sh_symbol">,</span><span class="sh_number">498865</span><span class="sh_symbol">,</span><span class="sh_number">497933</span><span class="sh_symbol">,</span><span class="sh_number">507014</span><span class="sh_symbol">,</span><span class="sh_number">506995</span><span class="sh_symbol">,</span><span class="sh_number">505950</span><span class="sh_symbol">,</span><span class="sh_number">439843</span><span class="sh_symbol">,</span><span class="sh_number">467890</span><span class="sh_symbol">,</span><span class="sh_number">506668</span><span class="sh_symbol">,</span><span class="sh_number">506119</span><span class="sh_symbol">,</span> <span class="sh_number">501773</span><span class="sh_symbol">,</span><span class="sh_number">504380</span><span class="sh_symbol">,</span><span class="sh_number">503586</span><span class="sh_symbol">,</span><span class="sh_number">392894</span><span class="sh_symbol">,</span><span class="sh_number">288247</span><span class="sh_symbol">,</span><span class="sh_number">503614</span><span class="sh_symbol">,</span><span class="sh_number">503108</span><span class="sh_symbol">,</span><span class="sh_number">418280</span><span class="sh_symbol">,</span><span class="sh_number">513678</span><span class="sh_symbol">,</span><span class="sh_number">487207</span><span class="sh_symbol">,</span><span class="sh_number">492564</span><span class="sh_symbol">,</span><span class="sh_number">513638</span><span class="sh_symbol">,</span><span class="sh_number">513429</span><span class="sh_symbol">,</span><span class="sh_number">289792</span><span class="sh_symbol">,</span><span class="sh_number">289964</span><span class="sh_symbol">,</span> <span class="sh_number">435713</span><span class="sh_symbol">,</span><span class="sh_number">151070</span><span class="sh_symbol">,</span><span class="sh_number">512412</span><span class="sh_symbol">,</span><span class="sh_number">431803</span><span class="sh_symbol">,</span><span class="sh_number">484943</span><span class="sh_symbol">,</span><span class="sh_number">473044</span><span class="sh_symbol">,</span><span class="sh_number">508774</span><span class="sh_symbol">,</span><span class="sh_number">497119</span><span class="sh_symbol">,</span><span class="sh_number">327303</span><span class="sh_symbol">,</span><span class="sh_number">492799</span><span class="sh_symbol">,</span><span class="sh_number">208735</span><span class="sh_symbol">,</span><span class="sh_number">498726</span><span class="sh_symbol">,</span><span class="sh_number">505617</span><span class="sh_symbol">,</span><span class="sh_number">413570</span><span class="sh_symbol">,</span><span class="sh_number">513804</span><span class="sh_symbol">,</span> <span class="sh_number">482213</span><span class="sh_symbol">,</span><span class="sh_number">513968</span><span class="sh_symbol">,</span><span class="sh_number">513981</span><span class="sh_symbol">,</span><span class="sh_number">502217</span><span class="sh_symbol">,</span><span class="sh_number">507365</span><span class="sh_symbol">,</span><span class="sh_number">508594</span><span class="sh_symbol">,</span><span class="sh_number">504474</span><span class="sh_symbol">,</span><span class="sh_number">512915</span><span class="sh_symbol">,</span><span class="sh_number">512525</span><span class="sh_symbol">,</span><span class="sh_number">502367</span><span class="sh_symbol">,</span><span class="sh_number">513487</span><span class="sh_symbol">,</span><span class="sh_number">513002</span><span class="sh_symbol">,</span><span class="sh_number">512606</span><span class="sh_symbol">,</span><span class="sh_number">512442</span><span class="sh_symbol">,</span><span class="sh_number">512570</span><span class="sh_symbol">,</span> <span class="sh_number">512387</span><span class="sh_symbol">,</span><span class="sh_number">512085</span><span class="sh_symbol">,</span><span class="sh_number">511795</span><span class="sh_symbol">,</span><span class="sh_number">512089</span><span class="sh_symbol">,</span><span class="sh_number">510382</span><span class="sh_symbol">,</span><span class="sh_number">511475</span><span class="sh_symbol">,</span><span class="sh_number">505926</span><span class="sh_symbol">,</span><span class="sh_number">511188</span><span class="sh_symbol">,</span><span class="sh_number">511093</span><span class="sh_symbol">,</span><span class="sh_number">510847</span><span class="sh_symbol">,</span><span class="sh_number">510691</span><span class="sh_symbol">,</span><span class="sh_number">510422</span><span class="sh_symbol">,</span><span class="sh_number">509275</span><span class="sh_symbol">,</span><span class="sh_number">509241</span><span class="sh_symbol">,</span><span class="sh_number">509157</span><span class="sh_symbol">,</span> <span class="sh_number">509083</span><span class="sh_symbol">,</span><span class="sh_number">508882</span><span class="sh_symbol">,</span><span class="sh_number">508057</span><span class="sh_symbol">,</span><span class="sh_number">508849</span><span class="sh_symbol">,</span><span class="sh_number">508673</span><span class="sh_symbol">,</span><span class="sh_number">508103</span><span class="sh_symbol">,</span><span class="sh_number">507510</span><span class="sh_symbol">,</span><span class="sh_number">507260</span><span class="sh_symbol">,</span><span class="sh_number">507241</span><span class="sh_symbol">,</span><span class="sh_number">506729</span><span class="sh_symbol">,</span><span class="sh_number">506697</span><span class="sh_symbol">,</span><span class="sh_number">506689</span><span class="sh_symbol">,</span><span class="sh_number">506430</span><span class="sh_symbol">,</span><span class="sh_number">505845</span><span class="sh_symbol">,</span><span class="sh_number">505607</span><span class="sh_symbol">,</span> <span class="sh_number">504993</span><span class="sh_symbol">,</span><span class="sh_number">504988</span><span class="sh_symbol">,</span><span class="sh_number">504327</span><span class="sh_symbol">,</span><span class="sh_number">504005</span><span class="sh_symbol">,</span><span class="sh_number">503775</span><span class="sh_symbol">,</span><span class="sh_number">503709</span><span class="sh_symbol">,</span><span class="sh_number">503590</span><span class="sh_symbol">,</span><span class="sh_number">503498</span><span class="sh_symbol">,</span><span class="sh_number">503334</span><span class="sh_symbol">,</span><span class="sh_number">503206</span><span class="sh_symbol">,</span><span class="sh_number">503298</span><span class="sh_symbol">,</span><span class="sh_number">283470</span><span class="sh_symbol">,</span><span class="sh_number">501668</span><span class="sh_symbol">,</span><span class="sh_number">502362</span><span class="sh_symbol">,</span><span class="sh_number">502190</span><span class="sh_symbol">,</span> <span class="sh_number">501444</span><span class="sh_symbol">,</span><span class="sh_number">501345</span><span class="sh_symbol">,</span><span class="sh_number">500825</span><span class="sh_symbol">,</span><span class="sh_number">500637</span><span class="sh_symbol">,</span><span class="sh_number">500843</span><span class="sh_symbol">,</span><span class="sh_number">500630</span><span class="sh_symbol">,</span><span class="sh_number">500190</span><span class="sh_symbol">,</span><span class="sh_number">500078</span><span class="sh_symbol">,</span><span class="sh_number">499802</span><span class="sh_symbol">,</span><span class="sh_number">498950</span><span class="sh_symbol">,</span><span class="sh_number">498417</span><span class="sh_symbol">,</span><span class="sh_number">498115</span><span class="sh_symbol">,</span><span class="sh_number">497795</span><span class="sh_symbol">,</span><span class="sh_number">495883</span><span class="sh_symbol">,</span><span class="sh_number">497163</span><span class="sh_symbol">,</span> <span class="sh_number">495995</span><span class="sh_symbol">,</span><span class="sh_number">490808</span><span class="sh_symbol">,</span><span class="sh_number">476102</span><span class="sh_symbol">,</span><span class="sh_number">476758</span><span class="sh_symbol">,</span><span class="sh_number">514045</span><span class="sh_symbol">,</span><span class="sh_number">505250</span><span class="sh_symbol">,</span><span class="sh_number">514143</span><span class="sh_symbol">,</span><span class="sh_number">514332</span><span class="sh_symbol">,</span><span class="sh_number">507958</span><span class="sh_symbol">,</span><span class="sh_number">514409</span><span class="sh_symbol">,</span><span class="sh_number">426481</span><span class="sh_symbol">,</span><span class="sh_number">432055</span><span class="sh_symbol">,</span><span class="sh_number">428693</span><span class="sh_symbol">,</span><span class="sh_number">440592</span><span class="sh_symbol">,</span><span class="sh_number">509598</span><span class="sh_symbol">,</span> <span class="sh_number">514445</span><span class="sh_symbol">,</span><span class="sh_number">514517</span><span class="sh_symbol">,</span><span class="sh_number">514637</span><span class="sh_symbol">,</span><span class="sh_number">514412</span><span class="sh_symbol">,</span><span class="sh_number">445056</span><span class="sh_symbol">,</span><span class="sh_number">473740</span><span class="sh_symbol">,</span><span class="sh_number">488376</span><span class="sh_symbol">,</span><span class="sh_number">510780</span><span class="sh_symbol">,</span><span class="sh_number">514863</span><span class="sh_symbol">,</span><span class="sh_number">514894</span><span class="sh_symbol">,</span><span class="sh_number">515078</span><span class="sh_symbol">,</span><span class="sh_number">512570</span><span class="sh_symbol">,</span><span class="sh_number">510946</span><span class="sh_symbol">,</span><span class="sh_number">507241</span><span class="sh_symbol">,</span><span class="sh_number">506729</span><span class="sh_symbol">,</span> <span class="sh_number">515107</span><span class="sh_symbol">,</span><span class="sh_number">515223</span><span class="sh_symbol">,</span><span class="sh_number">514725</span><span class="sh_symbol">,</span><span class="sh_number">515272</span><span class="sh_symbol">,</span><span class="sh_number">515299</span><span class="sh_symbol">,</span><span class="sh_number">515313</span><span class="sh_symbol">,</span><span class="sh_number">470172</span><span class="sh_symbol">,</span><span class="sh_number">515268</span><span class="sh_symbol">,</span><span class="sh_number">515446</span><span class="sh_symbol">,</span><span class="sh_number">515440</span><span class="sh_symbol">,</span><span class="sh_number">515489</span><span class="sh_symbol">,</span><span class="sh_number">515465</span><span class="sh_symbol">,</span><span class="sh_number">515540</span><span class="sh_symbol">,</span><span class="sh_number">420148</span><span class="sh_symbol">,</span><span class="sh_number">515577</span><span class="sh_symbol">,</span> <span class="sh_number">515862</span><span class="sh_symbol">,</span><span class="sh_number">506824</span><span class="sh_symbol">,</span><span class="sh_number">501137</span><span class="sh_symbol">,</span><span class="sh_number">503837</span><span class="sh_symbol">,</span><span class="sh_number">516035</span><span class="sh_symbol">,</span><span class="sh_number">516034</span><span class="sh_symbol">,</span><span class="sh_number">516152</span><span class="sh_symbol">,</span><span class="sh_number">508693</span><span class="sh_symbol">,</span><span class="sh_number">516334</span><span class="sh_symbol">,</span><span class="sh_number">481002</span><span class="sh_symbol">,</span><span class="sh_number">256842</span> <span class="sh_symbol">];</span> <span class="sh_comment">/* IDs of useless authors. These include authors who only post unexplained copies of existing scripts and </span> <span class="sh_comment">scripts that primarily do nothing. */</span> <span class="sh_keyword">var</span> useless <span class="sh_symbol">=</span> <span class="sh_symbol">[</span> <span class="sh_number">513573</span><span class="sh_symbol">,</span><span class="sh_number">484405</span><span class="sh_symbol">,</span><span class="sh_number">513621</span><span class="sh_symbol">,</span><span class="sh_number">422292</span><span class="sh_symbol">,</span><span class="sh_number">478814</span><span class="sh_symbol">,</span><span class="sh_number">513746</span><span class="sh_symbol">,</span><span class="sh_number">494425</span><span class="sh_symbol">,</span><span class="sh_number">508578</span><span class="sh_symbol">,</span><span class="sh_number">498070</span><span class="sh_symbol">,</span><span class="sh_number">500894</span><span class="sh_symbol">,</span><span class="sh_number">514046</span><span class="sh_symbol">,</span><span class="sh_number">514258</span><span class="sh_symbol">,</span><span class="sh_number">512116</span><span class="sh_symbol">,</span><span class="sh_number">466803</span><span class="sh_symbol">,</span><span class="sh_number">506234</span><span class="sh_symbol">,</span> <span class="sh_number">182070</span><span class="sh_symbol">,</span><span class="sh_number">154802</span><span class="sh_symbol">,</span><span class="sh_number">210716</span><span class="sh_symbol">,</span><span class="sh_number">326372</span><span class="sh_symbol">,</span><span class="sh_number">142623</span><span class="sh_symbol">,</span><span class="sh_number">479344</span><span class="sh_symbol">,</span><span class="sh_number">412017</span><span class="sh_symbol">,</span><span class="sh_number">195004</span><span class="sh_symbol">,</span><span class="sh_number">209847</span><span class="sh_symbol">,</span><span class="sh_number">483188</span><span class="sh_symbol">,</span><span class="sh_number">515140</span><span class="sh_symbol">,</span><span class="sh_number">506391</span><span class="sh_symbol">,</span><span class="sh_number">502722</span><span class="sh_symbol">,</span><span class="sh_number">497223</span><span class="sh_symbol">,</span><span class="sh_number">516057</span> <span class="sh_symbol">];</span> <span class="sh_comment">/* IDs of accounts that haven't posted scripts (yet) but are clearly operated by scam authors </span> <span class="sh_comment">(ie. they post dummy reviews for scams, etc) */</span> <span class="sh_keyword">var</span> scamHelpers <span class="sh_symbol">=</span> <span class="sh_symbol">[</span> <span class="sh_number">505792</span><span class="sh_symbol">,</span><span class="sh_number">505791</span><span class="sh_symbol">,</span><span class="sh_number">505782</span><span class="sh_symbol">,</span><span class="sh_number">505352</span><span class="sh_symbol">,</span><span class="sh_number">505300</span><span class="sh_symbol">,</span><span class="sh_number">502220</span><span class="sh_symbol">,</span><span class="sh_number">442199</span><span class="sh_symbol">,</span><span class="sh_number">442192</span><span class="sh_symbol">,</span><span class="sh_number">502618</span><span class="sh_symbol">,</span><span class="sh_number">513557</span><span class="sh_symbol">,</span><span class="sh_number">196818</span><span class="sh_symbol">,</span><span class="sh_number">498788</span><span class="sh_symbol">,</span><span class="sh_number">501053</span><span class="sh_symbol">,</span><span class="sh_number">513390</span><span class="sh_symbol">,</span><span class="sh_number">513028</span><span class="sh_symbol">,</span> <span class="sh_number">509806</span> <span class="sh_symbol">];</span> <span class="sh_comment">/* IDs of authors who post Packer and other obfuscated (hidden) code, and privately-hosted remote code, </span> <span class="sh_comment">that can not be easily verified. */</span> <span class="sh_keyword">var</span> obfuscated <span class="sh_symbol">=</span> <span class="sh_symbol">[</span> <span class="sh_number">506312</span><span class="sh_symbol">,</span><span class="sh_number">482708</span><span class="sh_symbol">,</span><span class="sh_number">426106</span><span class="sh_symbol">,</span><span class="sh_number">469018</span><span class="sh_symbol">,</span><span class="sh_number">422222</span><span class="sh_symbol">,</span><span class="sh_number">442786</span><span class="sh_symbol">,</span><span class="sh_number">422223</span><span class="sh_symbol">,</span><span class="sh_number">422224</span><span class="sh_symbol">,</span><span class="sh_number">422226</span><span class="sh_symbol">,</span><span class="sh_number">422227</span><span class="sh_symbol">,</span><span class="sh_number">473813</span><span class="sh_symbol">,</span><span class="sh_number">505802</span><span class="sh_symbol">,</span><span class="sh_number">505802</span><span class="sh_symbol">,</span><span class="sh_number">512195</span><span class="sh_symbol">,</span><span class="sh_number">511096</span><span class="sh_symbol">,</span> <span class="sh_number">434917</span><span class="sh_symbol">,</span><span class="sh_number">292807</span><span class="sh_symbol">,</span><span class="sh_number">398936</span><span class="sh_symbol">,</span><span class="sh_number">199618</span><span class="sh_symbol">,</span><span class="sh_number">485411</span><span class="sh_symbol">,</span><span class="sh_number">308463</span><span class="sh_symbol">,</span><span class="sh_number">437023</span><span class="sh_symbol">,</span><span class="sh_number">507118</span><span class="sh_symbol">,</span><span class="sh_number">506973</span><span class="sh_symbol">,</span><span class="sh_number">250955</span><span class="sh_symbol">,</span><span class="sh_number">469976</span><span class="sh_symbol">,</span><span class="sh_number">474262</span><span class="sh_symbol">,</span><span class="sh_number">439208</span><span class="sh_symbol">,</span><span class="sh_number">433063</span><span class="sh_symbol">,</span><span class="sh_number">130901</span><span class="sh_symbol">,</span> <span class="sh_number">360083</span><span class="sh_symbol">,</span><span class="sh_number">401264</span><span class="sh_symbol">,</span><span class="sh_number">286875</span><span class="sh_symbol">,</span><span class="sh_number">301639</span><span class="sh_symbol">,</span><span class="sh_number">126265</span><span class="sh_symbol">,</span><span class="sh_number">85357</span><span class="sh_symbol">,</span><span class="sh_number">76302</span><span class="sh_symbol">,</span><span class="sh_number">508036</span><span class="sh_symbol">,</span><span class="sh_number">365484</span><span class="sh_symbol">,</span><span class="sh_number">471746</span><span class="sh_symbol">,</span><span class="sh_number">179136</span><span class="sh_symbol">,</span><span class="sh_number">511801</span><span class="sh_symbol">,</span><span class="sh_number">499040</span><span class="sh_symbol">,</span><span class="sh_number">507524</span><span class="sh_symbol">,</span><span class="sh_number">470746</span><span class="sh_symbol">,</span> <span class="sh_number">507881</span><span class="sh_symbol">,</span><span class="sh_number">507267</span><span class="sh_symbol">,</span><span class="sh_number">484532</span><span class="sh_symbol">,</span><span class="sh_number">484441</span><span class="sh_symbol">,</span><span class="sh_number">412918</span><span class="sh_symbol">,</span><span class="sh_number">505444</span><span class="sh_symbol">,</span><span class="sh_number">493299</span><span class="sh_symbol">,</span><span class="sh_number">503861</span><span class="sh_symbol">,</span><span class="sh_number">469860</span><span class="sh_symbol">,</span><span class="sh_number">470394</span><span class="sh_symbol">,</span><span class="sh_number">331170</span><span class="sh_symbol">,</span><span class="sh_number">442420</span><span class="sh_symbol">,</span><span class="sh_number">511090</span><span class="sh_symbol">,</span><span class="sh_number">489916</span><span class="sh_symbol">,</span><span class="sh_number">369106</span><span class="sh_symbol">,</span> <span class="sh_number">514114</span><span class="sh_symbol">,</span><span class="sh_number">440592</span><span class="sh_symbol">,</span><span class="sh_number">514408</span><span class="sh_symbol">,</span><span class="sh_number">489669</span><span class="sh_symbol">,</span><span class="sh_number">514396</span><span class="sh_symbol">,</span><span class="sh_number">514718</span><span class="sh_symbol">,</span><span class="sh_number">320677</span><span class="sh_symbol">,</span><span class="sh_number">515026</span><span class="sh_symbol">,</span><span class="sh_number">509312</span><span class="sh_symbol">,</span><span class="sh_number">486160</span><span class="sh_symbol">,</span><span class="sh_number">516124</span><span class="sh_symbol">,</span><span class="sh_number">395734</span><span class="sh_symbol">,</span><span class="sh_number">515898</span><span class="sh_symbol">,</span><span class="sh_number">516107</span><span class="sh_symbol">,</span><span class="sh_number">516309</span> <span class="sh_symbol">];</span> <span class="sh_comment">/* Misc. suspicious: IDs of authors of suspicious scripts that are not confirmed scams but exhibit highly </span> <span class="sh_comment">suspicious behavior. This is currently populated primarily by Ultoo.com script authors. */</span> <span class="sh_keyword">var</span> suspicious <span class="sh_symbol">=</span> <span class="sh_symbol">[</span> <span class="sh_number">512776</span><span class="sh_symbol">,</span><span class="sh_number">505330</span><span class="sh_symbol">,</span><span class="sh_number">509760</span><span class="sh_symbol">,</span><span class="sh_number">508814</span><span class="sh_symbol">,</span><span class="sh_number">507726</span><span class="sh_symbol">,</span><span class="sh_number">511000</span><span class="sh_symbol">,</span><span class="sh_number">513360</span><span class="sh_symbol">,</span><span class="sh_number">511118</span><span class="sh_symbol">,</span><span class="sh_number">513246</span><span class="sh_symbol">,</span><span class="sh_number">509798</span><span class="sh_symbol">,</span><span class="sh_number">416110</span><span class="sh_symbol">,</span><span class="sh_number">505078</span><span class="sh_symbol">,</span><span class="sh_number">513216</span><span class="sh_symbol">,</span><span class="sh_number">513490</span><span class="sh_symbol">,</span><span class="sh_number">512836</span><span class="sh_symbol">,</span> <span class="sh_number">507909</span><span class="sh_symbol">,</span><span class="sh_number">505314</span><span class="sh_symbol">,</span><span class="sh_number">509298</span><span class="sh_symbol">,</span><span class="sh_number">513106</span><span class="sh_symbol">,</span><span class="sh_number">506607</span><span class="sh_symbol">,</span><span class="sh_number">512750</span><span class="sh_symbol">,</span><span class="sh_number">512842</span><span class="sh_symbol">,</span><span class="sh_number">506195</span><span class="sh_symbol">,</span><span class="sh_number">513236</span><span class="sh_symbol">,</span><span class="sh_number">508667</span><span class="sh_symbol">,</span><span class="sh_number">501009</span><span class="sh_symbol">,</span><span class="sh_number">505326</span><span class="sh_symbol">,</span><span class="sh_number">509690</span><span class="sh_symbol">,</span><span class="sh_number">508422</span><span class="sh_symbol">,</span><span class="sh_number">506068</span><span class="sh_symbol">,</span> <span class="sh_number">470374</span><span class="sh_symbol">,</span><span class="sh_number">505168</span><span class="sh_symbol">,</span><span class="sh_number">512743</span><span class="sh_symbol">,</span><span class="sh_number">512685</span><span class="sh_symbol">,</span><span class="sh_number">505778</span><span class="sh_symbol">,</span><span class="sh_number">423469</span><span class="sh_symbol">,</span><span class="sh_number">417384</span><span class="sh_symbol">,</span><span class="sh_number">512178</span><span class="sh_symbol">,</span><span class="sh_number">201391</span><span class="sh_symbol">,</span><span class="sh_number">511758</span><span class="sh_symbol">,</span><span class="sh_number">510350</span><span class="sh_symbol">,</span><span class="sh_number">510972</span><span class="sh_symbol">,</span><span class="sh_number">509965</span><span class="sh_symbol">,</span><span class="sh_number">508299</span><span class="sh_symbol">,</span><span class="sh_number">505635</span><span class="sh_symbol">,</span> <span class="sh_number">504693</span><span class="sh_symbol">,</span><span class="sh_number">508121</span><span class="sh_symbol">,</span><span class="sh_number">509729</span><span class="sh_symbol">,</span><span class="sh_number">511015</span><span class="sh_symbol">,</span><span class="sh_number">510766</span><span class="sh_symbol">,</span><span class="sh_number">507604</span><span class="sh_symbol">,</span><span class="sh_number">510191</span><span class="sh_symbol">,</span><span class="sh_number">510582</span><span class="sh_symbol">,</span><span class="sh_number">509360</span><span class="sh_symbol">,</span><span class="sh_number">507832</span><span class="sh_symbol">,</span><span class="sh_number">507466</span><span class="sh_symbol">,</span><span class="sh_number">509694</span><span class="sh_symbol">,</span><span class="sh_number">506866</span><span class="sh_symbol">,</span><span class="sh_number">505770</span><span class="sh_symbol">,</span><span class="sh_number">507854</span><span class="sh_symbol">,</span> <span class="sh_number">508794</span><span class="sh_symbol">,</span><span class="sh_number">506958</span><span class="sh_symbol">,</span><span class="sh_number">508725</span><span class="sh_symbol">,</span><span class="sh_number">470697</span><span class="sh_symbol">,</span><span class="sh_number">508401</span><span class="sh_symbol">,</span><span class="sh_number">507876</span><span class="sh_symbol">,</span><span class="sh_number">505912</span><span class="sh_symbol">,</span><span class="sh_number">505945</span><span class="sh_symbol">,</span><span class="sh_number">506579</span><span class="sh_symbol">,</span><span class="sh_number">505689</span><span class="sh_symbol">,</span><span class="sh_number">506680</span><span class="sh_symbol">,</span><span class="sh_number">508333</span><span class="sh_symbol">,</span><span class="sh_number">505434</span><span class="sh_symbol">,</span><span class="sh_number">506731</span><span class="sh_symbol">,</span><span class="sh_number">505035</span><span class="sh_symbol">,</span> <span class="sh_number">500679</span><span class="sh_symbol">,</span><span class="sh_number">506741</span><span class="sh_symbol">,</span><span class="sh_number">506998</span><span class="sh_symbol">,</span><span class="sh_number">506512</span><span class="sh_symbol">,</span><span class="sh_number">505247</span><span class="sh_symbol">,</span><span class="sh_number">505401</span><span class="sh_symbol">,</span><span class="sh_number">505047</span><span class="sh_symbol">,</span><span class="sh_number">513812</span><span class="sh_symbol">,</span><span class="sh_number">234423</span><span class="sh_symbol">,</span><span class="sh_number">513836</span><span class="sh_symbol">,</span><span class="sh_number">514361</span><span class="sh_symbol">,</span><span class="sh_number">514276</span><span class="sh_symbol">,</span><span class="sh_number">514231</span><span class="sh_symbol">,</span><span class="sh_number">514399</span><span class="sh_symbol">,</span><span class="sh_number">514231</span><span class="sh_symbol">,</span> <span class="sh_number">514448</span><span class="sh_symbol">,</span><span class="sh_number">503630</span><span class="sh_symbol">,</span><span class="sh_number">514493</span><span class="sh_symbol">,</span><span class="sh_number">513984</span><span class="sh_symbol">,</span><span class="sh_number">514728</span><span class="sh_symbol">,</span><span class="sh_number">514873</span><span class="sh_symbol">,</span><span class="sh_number">169798</span><span class="sh_symbol">,</span><span class="sh_number">513360</span><span class="sh_symbol">,</span><span class="sh_number">514911</span><span class="sh_symbol">,</span><span class="sh_number">514768</span><span class="sh_symbol">,</span><span class="sh_number">514953</span><span class="sh_symbol">,</span><span class="sh_number">503846</span><span class="sh_symbol">,</span><span class="sh_number">514658</span><span class="sh_symbol">,</span><span class="sh_number">515321</span><span class="sh_symbol">,</span><span class="sh_number">504962</span><span class="sh_symbol">,</span> <span class="sh_number">515176</span><span class="sh_symbol">,</span><span class="sh_number">510636</span><span class="sh_symbol">,</span><span class="sh_number">515832</span><span class="sh_symbol">,</span><span class="sh_number">10072</span><span class="sh_symbol">,</span><span class="sh_number">516079</span><span class="sh_symbol">,</span><span class="sh_number">516201</span><span class="sh_symbol">,</span><span class="sh_number">516225</span> <span class="sh_symbol">];</span> <span class="sh_comment">/* IDs below belong to scripts rather than authors. Used to block scripts that the author doesn't intend as malicious, but nevertheless are -- </span> <span class="sh_comment">such as scripts advertised as "pranks". Though authors who ONLY post pranks (and similar) will probably be added to the scammer list. */</span> <span class="sh_keyword">var</span> pranks <span class="sh_symbol">=</span> <span class="sh_symbol">[</span><span class="sh_number">124287</span><span class="sh_symbol">,</span><span class="sh_number">165241</span><span class="sh_symbol">,</span><span class="sh_number">142050</span><span class="sh_symbol">,</span><span class="sh_number">165892</span><span class="sh_symbol">,</span><span class="sh_number">165889</span><span class="sh_symbol">];</span> <span class="sh_comment">// Ignore the following script authors. This is to prevent known false-positive detections</span> <span class="sh_keyword">var</span> whitelist <span class="sh_symbol">=</span> <span class="sh_symbol">[</span> <span class="sh_number">501553</span><span class="sh_symbol">,</span><span class="sh_number">19916</span><span class="sh_symbol">,</span><span class="sh_number">297645</span><span class="sh_symbol">,</span><span class="sh_number">86416</span><span class="sh_symbol">,</span><span class="sh_number">103626</span><span class="sh_symbol">,</span><span class="sh_number">169575</span><span class="sh_symbol">,</span><span class="sh_number">386991</span> <span class="sh_symbol">];</span> <span class="sh_comment">// Combine all author blacklist arrays into one</span> <span class="sh_keyword">var</span> blacklist <span class="sh_symbol">=</span> scammers<span class="sh_symbol">.</span><span class="sh_function">concat</span><span class="sh_symbol">(</span>useless<span class="sh_symbol">).</span><span class="sh_function">concat</span><span class="sh_symbol">(</span>suspicious<span class="sh_symbol">).</span><span class="sh_function">concat</span><span class="sh_symbol">(</span>obfuscated<span class="sh_symbol">).</span><span class="sh_function">concat</span><span class="sh_symbol">(</span>scamHelpers<span class="sh_symbol">);</span> <span class="sh_comment">// Display blacklist total in settings</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.tally'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">(</span>blacklist<span class="sh_symbol">.</span>length<span class="sh_symbol">);</span> <span class="sh_comment">// *************************** For individual script pages *****************************</span> <span class="sh_comment">// If we're on a particular script page, any tab, check it and display a warning if it's suspect</span> <span class="sh_keyword">if</span> <span class="sh_symbol">((</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/show'</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">||</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/review'</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">||</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/fans'</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">||</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/issues'</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">||</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_string">'/discuss'</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">))</span><span class="sh_cbracket">{</span> <span class="sh_comment">// Set the warning to use on individual scam script pages</span> <span class="sh_keyword">var</span> pageWarning <span class="sh_symbol">=</span> <span class="sh_string">'<div class="aboutWarning" style="width:80%; border:2px red solid; line-height:20px; color:darkred; font-size:14px; font-weight:bold;'</span><br /> <span class=" sh_symbol"="">+ <span class="sh_string">'padding:3px; margin:5px 5px -3px 5px; text-align:center;">'</span> <span class="sh_symbol">+</span> <span class="sh_string">'This script is a suspected scam. Use caution before installing it.'</span> <span class="sh_symbol">+</span> <span class="sh_string">'</span></div><br />'</span><span class="sh_symbol">;</span> <span class="sh_comment">// Extract author ID from author link</span> <span class="sh_keyword">var</span> author <span class="sh_symbol">=</span> <span class="sh_function">parseInt</span><span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'a[user_id]'</span><span class="sh_symbol">).</span><span class="sh_function">attr</span><span class="sh_symbol">(</span><span class="sh_string">'user_id'</span><span class="sh_symbol">));</span> <span class="sh_comment">// Extract script ID from the URL</span> <span class="sh_keyword">var</span> urlSplit <span class="sh_symbol">=</span> location<span class="sh_symbol">.</span>pathname<span class="sh_symbol">.</span><span class="sh_function">split</span><span class="sh_symbol">(</span><span class="sh_string">'/'</span><span class="sh_symbol">);</span> <span class="sh_keyword">var</span> id <span class="sh_symbol">=</span> urlSplit<span class="sh_symbol">[(</span>urlSplit<span class="sh_symbol">.</span>length<span class="sh_number">-1</span><span class="sh_symbol">)];</span> <span class="sh_comment">// Check the author ID against our whitelist and scammer list</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>whitelist<span class="sh_symbol">.</span><span class="sh_function">indexOf</span><span class="sh_symbol">(</span>author<span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">return</span> <span class="sh_keyword">false</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>blacklist<span class="sh_symbol">.</span><span class="sh_function">indexOf</span><span class="sh_symbol">(</span>author<span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_function">tagScamPage</span><span class="sh_symbol">();</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>pranks<span class="sh_symbol">.</span><span class="sh_function">indexOf</span><span class="sh_symbol">(</span><span class="sh_function">parseInt</span><span class="sh_symbol">(</span>id<span class="sh_symbol">))</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_function">tagScamPage</span><span class="sh_symbol">();</span> <span class="sh_comment">// If the author wasn't found in any list, retrieve the script code for scanning</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_cbracket">{</span> $<span class="sh_symbol">.</span><span class="sh_function">ajax</span><span class="sh_symbol">(</span><span class="sh_cbracket">{</span> url<span class="sh_symbol">:</span> location<span class="sh_symbol">.</span>protocol <span class="sh_symbol">+</span> <span class="sh_string">'//userscripts.org/scripts/source/'</span> <span class="sh_symbol">+</span> id <span class="sh_symbol">+</span> <span class="sh_string">'.user.js'</span><span class="sh_symbol">,</span> dataType<span class="sh_symbol">:</span> <span class="sh_string">'text'</span><span class="sh_symbol">,</span> cache<span class="sh_symbol">:</span> <span class="sh_keyword">false</span><span class="sh_symbol">,</span> success<span class="sh_symbol">:</span> <span class="sh_keyword">function</span><span class="sh_symbol">(</span>data<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_function">checkScript</span><span class="sh_symbol">(</span>data<span class="sh_symbol">,</span><span class="sh_keyword">false</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span><span class="sh_comment">// ************************************** End individual script pages *****************************************</span> <span class="sh_comment">// Declare some variables as global</span> <span class="sh_keyword">var</span> cScamHide<span class="sh_symbol">;</span> <span class="sh_keyword">var</span> suspects <span class="sh_symbol">=</span> <span class="sh_symbol">[];</span> <span class="sh_comment">/* Check for an existing session cookie: Ajax Range header for bandwidth reduction measure doesn't work without a session cookie.</span> <span class="sh_comment">If one is not found, retrieve the login page once (without logging in), which creates the session cookie for us */</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(!</span>$<span class="sh_symbol">.</span><span class="sh_function">cookie</span><span class="sh_symbol">(</span><span class="sh_string">'_uso_session'</span><span class="sh_symbol">))</span> <span class="sh_cbracket">{</span> $<span class="sh_symbol">.</span><span class="sh_function">ajax</span><span class="sh_symbol">(</span><span class="sh_cbracket">{</span> url<span class="sh_symbol">:</span> location<span class="sh_symbol">.</span>protocol <span class="sh_symbol">+</span> <span class="sh_string">'//userscripts.org/login'</span><span class="sh_symbol">,</span> dataType<span class="sh_symbol">:</span> <span class="sh_string">'text'</span><span class="sh_symbol">,</span> async<span class="sh_symbol">:</span> <span class="sh_keyword">false</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_comment">// If toggle cookie doesn't exist yet, create it, so our toggle state can be saved</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_function">GM_getValue</span><span class="sh_symbol">(</span><span class="sh_string">'hide'</span><span class="sh_symbol">,-</span><span class="sh_number">5</span><span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_symbol">-</span><span class="sh_number">5</span><span class="sh_symbol">)</span> <span class="sh_function">GM_setValue</span><span class="sh_symbol">(</span><span class="sh_string">'hide'</span><span class="sh_symbol">,</span><span class="sh_string">'1'</span><span class="sh_symbol">);</span> <span class="sh_comment">// Create a function to read toggle cookie</span> <span class="sh_keyword">function</span> <span class="sh_function">readCookie</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span>cScamHide <span class="sh_symbol">=</span> <span class="sh_symbol">(</span><span class="sh_function">GM_getValue</span><span class="sh_symbol">(</span><span class="sh_string">'hide'</span><span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">?</span> <span class="sh_keyword">true</span> <span class="sh_symbol">:</span> <span class="sh_keyword">false</span><span class="sh_symbol">;</span><span class="sh_cbracket">}</span> <span class="sh_comment">// Set the text to use when tagging suspected scam scripts</span> <span class="sh_keyword">var</span> tag <span class="sh_symbol">=</span> <span class="sh_string">'<span style="color:darkred;font-weight:bold;line-height:50%;">'</span> <span class="sh_symbol">+</span> <span class="sh_string">'[SUSPECTED SCAM]'</span> <span class="sh_symbol">+</span> <span class="sh_string">'</span> '</span><span class="sh_symbol">;</span> <span class="sh_comment">// Set the expanded warning to be placed in the descriptions of suspected scam scripts</span> <span class="sh_keyword">var</span> caution <span class="sh_symbol">=</span> <span class="sh_string">'<span style="line-height:100%;color:darkred;font-weight:bold;margin-bottom:-10px;display:block;">'</span> <span class="sh_symbol">+</span> <span class="sh_string">'Warning: This script is a suspected scam. Use caution before installing it. <span class="authorWarn"></span>'</span> <span class="sh_symbol">+</span> <span class="sh_string">' <span class="reason" style="color:red;font-weight:bold;font-family:verdana;font-size:90%;line-height:150%;" hidden=""></span></span> '</span> <span class="sh_symbol">+</span> <span class="sh_string">'<span style="font-style:italic;line-height:110%;">Author</span><span class="sh_specialchar">\'</span><span class="sh_string">s description:</span> '</span><span class="sh_symbol">;</span> <span class="sh_comment">// Set update notice</span> <span class="sh_keyword">var</span> notify <span class="sh_symbol">=</span> <span class="sh_string">' <a style="font-size:80%" class="notify" target="_blank" href="'</span> <span class=" sh_symbol"="">+</a></span><a style="font-size:80%" class="notify" target="_blank" href="'</span> <span class=" sh_symbol"=""> thisScriptURL <span class="sh_symbol">+</span> <span class="sh_string">'">'</span> <span class="sh_symbol">+</span> <span class="sh_string">'Filter Update Available!</span></a>'<span class="sh_symbol">;</span> <span class="sh_comment">// Insert our toggle link, along with fields to show # of detected scams and the auto-update notice</span> <span class="sh_keyword">var</span> toggleLink <span class="sh_symbol">=</span> <span class="sh_string">"Toggle Scam Filter"</span><span class="sh_symbol">;</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>location<span class="sh_symbol">.</span>pathname <span class="sh_symbol">==</span> <span class="sh_string">'/'</span><span class="sh_symbol">)</span> toggleLink <span class="sh_symbol">=</span> <span class="sh_string">"Scam Toggle"</span><span class="sh_symbol">;</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'th.la:contains("Name"):lt(2)'</span><span class="sh_symbol">)</span> <span class="sh_symbol">.</span><span class="sh_function">append</span><span class="sh_symbol">(</span><span class="sh_string">' '</span> <span class="sh_symbol">+</span> <span class="sh_string">'<a href="#a" class="autoToggle">'</a></span><a href="#a" class="autoToggle"><span class="sh_symbol">+</span> toggleLink <span class="sh_symbol">+</span><span class="sh_string">'</span></a> (' <span class="sh_symbol">+</span> <span class="sh_string">'<span class="working" style="color:orange;text-shadow:0px 0px 5px #yellow;">[Working]</span>'</span> <span class="sh_symbol">+</span> <span class="sh_string">': '</span> <span class="sh_symbol">+</span> <span class="sh_string">'<span class="total">0</span> '</span> <span class="sh_symbol">+</span> <span class="sh_string">'<span class="tog"></span>'</span> <span class="sh_symbol">+</span> <span class="sh_string">')'</span> <span class="sh_symbol">+</span> <span class="sh_string">'<span class="loading"></span>'</span> <span class="sh_symbol">+</span> <span class="sh_string">'<span class="upd"></span>'</span><span class="sh_symbol">);</span> <span class="sh_comment">// Set toggle link hover effect</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'a.autoToggle'</span><span class="sh_symbol">).</span><span class="sh_function">hover</span><span class="sh_symbol">(</span> <span class="sh_keyword">function</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_keyword">this</span><span class="sh_symbol">).</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'color'</span><span class="sh_symbol">,</span><span class="sh_string">'#FFDD11'</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span><span class="sh_symbol">,</span> <span class="sh_keyword">function</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_keyword">this</span><span class="sh_symbol">).</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'color'</span><span class="sh_symbol">,</span><span class="sh_string">'white'</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_symbol">);</span> <span class="sh_comment">// Read our cookie to determine toggle state</span> <span class="sh_function">readCookie</span><span class="sh_symbol">();</span> <span class="sh_comment">// Set toggle text based on cookie</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>cScamHide<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.tog'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_cbracket">{</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.tog'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">(</span><span class="sh_string">'shown'</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_comment">// Determine login status, which effects the location of elements on the page</span> <span class="sh_keyword">var</span> loggedIn <span class="sh_symbol">=</span> <span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'a.mail'</span><span class="sh_symbol">).</span>length <span class="sh_symbol">></span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_symbol">?</span> <span class="sh_keyword">true</span> <span class="sh_symbol">:</span> <span class="sh_keyword">false</span><span class="sh_symbol">;</span> <span class="sh_comment">// Loop through each list row</span> <span class="sh_keyword">function</span> <span class="sh_function">filter</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span> <span class="sh_comment">// Working</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.working'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">(</span><span class="sh_string">'[Working]'</span><span class="sh_symbol">).</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'color'</span><span class="sh_symbol">,</span><span class="sh_string">'orange'</span><span class="sh_symbol">).</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'text-shadow'</span><span class="sh_symbol">,</span><span class="sh_string">'0px 0px 5px #yellow'</span><span class="sh_symbol">);</span> <span class="sh_keyword">var</span> loopsLength <span class="sh_symbol">=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'tr[id^="scripts-"]:not(.checked)'</span><span class="sh_symbol">).</span>length<span class="sh_symbol">;</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'tr[id^="scripts-"]:not(.checked)'</span><span class="sh_symbol">).</span><span class="sh_function">each</span><span class="sh_symbol">(</span><span class="sh_keyword">function</span><span class="sh_symbol">(</span>i<span class="sh_symbol">,</span>val<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_keyword">this</span><span class="sh_symbol">).</span><span class="sh_function">addClass</span><span class="sh_symbol">(</span><span class="sh_string">'checked'</span><span class="sh_symbol">);</span> <span class="sh_comment">// Extract script ID from row ID</span> id <span class="sh_symbol">=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_keyword">this</span><span class="sh_symbol">).</span><span class="sh_function">attr</span><span class="sh_symbol">(</span><span class="sh_string">'id'</span><span class="sh_symbol">).</span><span class="sh_function">replace</span><span class="sh_symbol">(</span><span class="sh_string">'scripts-'</span><span class="sh_symbol">,</span><span class="sh_string">''</span><span class="sh_symbol">);</span> suspects<span class="sh_symbol">[</span>i<span class="sh_symbol">]</span> <span class="sh_symbol">=</span> id<span class="sh_symbol">;</span> <span class="sh_comment">// Get title length so we can determine where author code will be on the retrieved page </span> <span class="sh_keyword">var</span> offset <span class="sh_symbol">=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'tr[id="scripts-'</span> <span class="sh_symbol">+</span> id <span class="sh_symbol">+</span> <span class="sh_string">'"] a.title'</span><span class="sh_symbol">).</span><span class="sh_function">attr</span><span class="sh_symbol">(</span><span class="sh_string">'title'</span><span class="sh_symbol">).</span>length<span class="sh_symbol">;</span> <span class="sh_comment">// Author code is further down for logged-in users, so add to the offset if we're logged in</span> offset <span class="sh_symbol">=</span> <span class="sh_symbol">(</span>loggedIn<span class="sh_symbol">)</span> <span class="sh_symbol">?</span> <span class="sh_symbol">(</span>offset <span class="sh_symbol">+</span> <span class="sh_number">100</span><span class="sh_symbol">)</span> <span class="sh_symbol">:</span> offset<span class="sh_symbol">;</span> offset <span class="sh_symbol">=</span> offset <span class="sh_symbol">+</span> <span class="sh_number">100</span><span class="sh_symbol">;</span> <span class="sh_comment">// Retrieve that section of the script's "fans" page</span> $<span class="sh_symbol">.</span><span class="sh_function">ajax</span><span class="sh_symbol">(</span><span class="sh_cbracket">{</span> url<span class="sh_symbol">:</span> location<span class="sh_symbol">.</span>protocol <span class="sh_symbol">+</span> <span class="sh_string">'//userscripts.org/scripts/fans/'</span> <span class="sh_symbol">+</span> suspects<span class="sh_symbol">[</span>i<span class="sh_symbol">],</span> dataType<span class="sh_symbol">:</span> <span class="sh_string">'text'</span><span class="sh_symbol">,</span> headers<span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>Range<span class="sh_symbol">:</span> <span class="sh_string">"bytes="</span> <span class="sh_symbol">+</span> <span class="sh_symbol">(</span>offset <span class="sh_symbol">+</span> <span class="sh_number">1600</span><span class="sh_symbol">)</span> <span class="sh_symbol">+</span> <span class="sh_string">"-"</span> <span class="sh_symbol">+</span> <span class="sh_symbol">(</span>offset <span class="sh_symbol">+</span> <span class="sh_number">2300</span><span class="sh_symbol">)</span><span class="sh_cbracket">}</span><span class="sh_symbol">,</span> cache<span class="sh_symbol">:</span> <span class="sh_keyword">false</span><span class="sh_symbol">,</span> success<span class="sh_symbol">:</span> handOff1 <span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_keyword">function</span> <span class="sh_function">handOff1</span><span class="sh_symbol">(</span>data<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_comment">// Hand off the retrieved description page to the checkScriptAuthor function</span> <span class="sh_function">checkScriptAuthor</span><span class="sh_symbol">(</span>data<span class="sh_symbol">,</span> suspects<span class="sh_symbol">[</span>i<span class="sh_symbol">]);</span> <span class="sh_comment">// Debug author offset:</span> <span class="sh_comment">//alert(data);</span> <span class="sh_comment">// If this was the last loop iteration, change "Working" text to "Done" and hide/show scams based on toggle</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>i <span class="sh_symbol">==</span> loopsLength<span class="sh_number">-1</span><span class="sh_symbol">)</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.working'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">(</span><span class="sh_string">'Done'</span><span class="sh_symbol">).</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'color'</span><span class="sh_symbol">,</span><span class="sh_string">'white'</span><span class="sh_symbol">).</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'text-shadow'</span><span class="sh_symbol">,</span><span class="sh_string">''</span><span class="sh_symbol">);</span> <span class="sh_function">toggleScams</span><span class="sh_symbol">(</span><span class="sh_keyword">false</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_comment">// Run the filter initially</span> <span class="sh_function">filter</span><span class="sh_symbol">();</span> <span class="sh_keyword">function</span> <span class="sh_function">checkScriptAuthor</span><span class="sh_symbol">(</span>data<span class="sh_symbol">,</span> id<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> uid <span class="sh_symbol">=</span> id<span class="sh_symbol">;</span> <span class="sh_comment">// Get script author's ID from the retrieved script description page</span> <span class="sh_keyword">var</span> auth <span class="sh_symbol">=</span> data<span class="sh_symbol">.</span><span class="sh_function">match</span><span class="sh_symbol">(</span><span class="sh_regexp">/;s=80&default=identicon" rel="nofollow" user_id="(\d*)"\>(.*)\<\/a\>/i</span><span class="sh_symbol">);</span> <span class="sh_keyword">var</span> authorID <span class="sh_symbol">=</span> <span class="sh_function">parseInt</span><span class="sh_symbol">(</span>RegExp<span class="sh_symbol">.</span>$<span class="sh_number">1</span><span class="sh_symbol">);</span> <span class="sh_keyword">var</span> authorText <span class="sh_symbol">=</span> RegExp<span class="sh_symbol">.</span>$<span class="sh_number">2</span><span class="sh_symbol">;</span> <span class="sh_comment">// Debug author offset:</span> <span class="sh_comment">//$('p.subtitle').append(' ' + auth + ' ' + authorID + ' ' + authorText);</span> <span class="sh_comment">// Check if the script is in the pranks list, tag and move on if it is</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>pranks<span class="sh_symbol">.</span><span class="sh_function">indexOf</span><span class="sh_symbol">(</span><span class="sh_function">parseInt</span><span class="sh_symbol">(</span>uid<span class="sh_symbol">))</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_function">tagScam</span><span class="sh_symbol">(</span><span class="sh_string">'prank'</span><span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">);</span> <span class="sh_comment">// If the script's author is in our whitelist, move on</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>whitelist<span class="sh_symbol">.</span><span class="sh_function">indexOf</span><span class="sh_symbol">(</span>authorID<span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">return</span> <span class="sh_keyword">false</span><span class="sh_symbol">;</span> <span class="sh_comment">// If the script's author matches one of our known scammers, tag the script as a suspected scam</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>blacklist<span class="sh_symbol">.</span><span class="sh_function">indexOf</span><span class="sh_symbol">(</span>authorID<span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_function">tagScam</span><span class="sh_symbol">(</span><span class="sh_string">'scammer'</span><span class="sh_symbol">,</span>id<span class="sh_symbol">,</span>authorText<span class="sh_symbol">,</span>authorID<span class="sh_symbol">);</span> <span class="sh_comment">// Otherwise, retrieve the script code for scanning</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_cbracket">{</span> <span class="sh_comment">// Retrieve script meta data, which contains Userscripts.org's unique version stamp</span> <span class="sh_function">getMeta</span><span class="sh_symbol">(</span>id<span class="sh_symbol">).</span><span class="sh_function">success</span><span class="sh_symbol">(</span><span class="sh_keyword">function</span><span class="sh_symbol">(</span>data<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_comment">// Extract the version stamp</span> <span class="sh_keyword">var</span> usoVersion <span class="sh_symbol">=</span> <span class="sh_function">parseInt</span><span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">substr</span><span class="sh_symbol">(</span> data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/@uso:version/</span><span class="sh_symbol">)</span> <span class="sh_symbol">+</span> <span class="sh_number">17</span><span class="sh_symbol">,</span> <span class="sh_number">6</span><span class="sh_symbol">)</span> <span class="sh_symbol">);</span> <span class="sh_comment">// Get our cached data for this script, if it exists</span> <span class="sh_keyword">var</span> cache <span class="sh_symbol">=</span> <span class="sh_function">GM_getValue</span><span class="sh_symbol">(</span>id<span class="sh_symbol">,</span><span class="sh_number">0</span><span class="sh_symbol">);</span> <span class="sh_comment">// If there is cache data for the script, extract the cached version stamp and cached scan result</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>cache <span class="sh_symbol">!=</span> <span class="sh_number">0</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> cacheVersion <span class="sh_symbol">=</span> cache<span class="sh_symbol">.</span><span class="sh_function">split</span><span class="sh_symbol">(</span><span class="sh_string">','</span><span class="sh_symbol">)[</span><span class="sh_number">0</span><span class="sh_symbol">];</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> cache<span class="sh_symbol">.</span><span class="sh_function">split</span><span class="sh_symbol">(</span><span class="sh_string">','</span><span class="sh_symbol">)[</span><span class="sh_number">1</span><span class="sh_symbol">];</span> <span class="sh_cbracket">}</span> <span class="sh_comment">// If there is no cache data for this script, or if the cached version stamp doesn't match Userscripts.org's </span> <span class="sh_comment">// stamp, retrieve the script code for scanning.</span> <span class="sh_keyword">if</span> <span class="sh_symbol">((</span>cacheVersion <span class="sh_symbol">!=</span> usoVersion<span class="sh_symbol">)</span> <span class="sh_symbol">||</span> <span class="sh_symbol">(</span>cache <span class="sh_symbol">==</span> <span class="sh_number">0</span><span class="sh_symbol">))</span><span class="sh_cbracket">{</span> $<span class="sh_symbol">.</span><span class="sh_function">ajax</span><span class="sh_symbol">(</span><span class="sh_cbracket">{</span> url<span class="sh_symbol">:</span> location<span class="sh_symbol">.</span>protocol <span class="sh_symbol">+</span> <span class="sh_string">'//userscripts.org/scripts/source/'</span> <span class="sh_symbol">+</span> id <span class="sh_symbol">+</span> <span class="sh_string">'.user.js'</span><span class="sh_symbol">,</span> dataType<span class="sh_symbol">:</span> <span class="sh_string">'text'</span><span class="sh_symbol">,</span> cache<span class="sh_symbol">:</span> <span class="sh_keyword">false</span><span class="sh_symbol">,</span> success<span class="sh_symbol">:</span> <span class="sh_keyword">function</span><span class="sh_symbol">(</span>data<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_function">handOff2</span><span class="sh_symbol">(</span>data<span class="sh_symbol">,</span> uid<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_keyword">function</span> <span class="sh_function">handOff2</span><span class="sh_symbol">(</span>data<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_comment">// Hand off the retrieved script code to the checkScript function</span> <span class="sh_function">checkScript</span><span class="sh_symbol">(</span>data<span class="sh_symbol">,</span> <span class="sh_keyword">true</span><span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> usoVersion<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_comment">/* Otherwise, we have cache data that is current (the cached version stamp matches the retrieved version </span> <span class="sh_comment"> stamp), AND the script was determined to be a scam (a 'reason' value of '1' means NO scam, all others </span> <span class="sh_comment"> indicate scams). Tag the scam using the cached reason. */</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">!=</span> <span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> uid<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">function</span> <span class="sh_function">getMeta</span><span class="sh_symbol">(</span>id<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_comment">// Start meta.js retrieval, return a "promise", because JS is too retarded to handle asynchronous returns right now</span> <span class="sh_keyword">return</span> $<span class="sh_symbol">.</span><span class="sh_function">ajax</span><span class="sh_symbol">(</span><span class="sh_cbracket">{</span> url<span class="sh_symbol">:</span> location<span class="sh_symbol">.</span>protocol <span class="sh_symbol">+</span> <span class="sh_string">'//userscripts.org/scripts/source/'</span> <span class="sh_symbol">+</span> id <span class="sh_symbol">+</span> <span class="sh_string">'.meta.js'</span><span class="sh_symbol">,</span> dataType<span class="sh_symbol">:</span> <span class="sh_string">'text'</span><span class="sh_symbol">,</span> cache<span class="sh_symbol">:</span> <span class="sh_keyword">false</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">function</span> <span class="sh_function">checkScript</span><span class="sh_symbol">(</span>data<span class="sh_symbol">,</span>isList<span class="sh_symbol">,</span>id<span class="sh_symbol">,</span>usoVersion<span class="sh_symbol">,</span>authorText<span class="sh_symbol">,</span>authorID<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_comment">//Skip scripts that don't contain at least one instance of the word "facebook", "ultoo", or "ask.fm"</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/facebook/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">||</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/ultoo/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">||</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/ask\.fm/i</span><span class="sh_symbol">)))</span><span class="sh_cbracket">{</span> <span class="sh_comment">// Check the script code for known scam patterns</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/&action\=subscribe/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'&action=subscribe'</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/\/ajax\/friends\/lists\/subscribe/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'/ajax/friends/lists/subscribe'</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/\/ajax\/follow\/follow_profile\.php/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'/ajax/follow/follow_profile.php'</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">((</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/p,a,c,k,e,(d|r)/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/eval/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">))</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'packer'</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/facebook.com\/plugins\/(like|follow)\.php?href\=/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'facebook.com/plugins/like.php?href='</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/(&|\?)action\=add_friend/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'paramsAdd'</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/document\.getElementById\('MobileNos_'\)/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/ultoo/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'ultooNumber'</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/document\.getElementsByName\('PollUserName'\)\[0\]/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/ultoo/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'ultooName'</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/\/ajax\/groups\/members\/add_post.php/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'facebook post'</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/iframe.*facebook\.com/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'facebook iframe'</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/ask\.fm\/likes.*\/add/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'ask.fm /add'</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/(facebook|twitter)\.com.*target\=/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'ask.fm spam'</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/(ask\.fm.*(ask|preguntame|pergunt(e|a)s?))|(href\='Skype)/i</span><span class="sh_symbol">)</span> <span class="sh_symbol">></span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>isList<span class="sh_symbol">)</span><span class="sh_cbracket">{</span><span class="sh_keyword">var</span> reason<span class="sh_symbol">=</span><span class="sh_string">'ask.fm spam'</span><span class="sh_symbol">;</span><span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span> id<span class="sh_symbol">,</span> authorText<span class="sh_symbol">,</span> authorID<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span><span class="sh_cbracket">{</span><span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_number">1</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_number">1</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_comment">// Store cache data: current version stamp and our scan results. A reason of '1' indicates NO scam.</span> <span class="sh_function">GM_setValue</span><span class="sh_symbol">(</span>id<span class="sh_symbol">,</span>usoVersion <span class="sh_symbol">+</span> <span class="sh_string">','</span> <span class="sh_symbol">+</span> reason<span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_comment">// Display warning on individual scam suspect pages</span> <span class="sh_keyword">function</span> <span class="sh_function">tagScamPage</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'h2.title'</span><span class="sh_symbol">).</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'color'</span><span class="sh_symbol">,</span><span class="sh_string">'darkred'</span><span class="sh_symbol">).</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'font-size'</span><span class="sh_symbol">,</span><span class="sh_string">'20px'</span><span class="sh_symbol">);</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'div#details'</span><span class="sh_symbol">).</span><span class="sh_function">append</span><span class="sh_symbol">(</span>pageWarning<span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">function</span> <span class="sh_function">tagScam</span><span class="sh_symbol">(</span>reason<span class="sh_symbol">,</span>id<span class="sh_symbol">,</span>authorText<span class="sh_symbol">,</span>authorID<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reasonPre <span class="sh_symbol">=</span> reason<span class="sh_symbol">;</span> <span class="sh_comment">// Set row selector</span> <span class="sh_keyword">var</span> row <span class="sh_symbol">=</span> <span class="sh_string">'tr[id="scripts-'</span> <span class="sh_symbol">+</span> id <span class="sh_symbol">+</span> <span class="sh_string">'"] '</span><span class="sh_symbol">;</span> <span class="sh_comment">// Tag the suspected scam's HTML code</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>row<span class="sh_symbol">).</span><span class="sh_function">addClass</span><span class="sh_symbol">(</span><span class="sh_string">'scam'</span><span class="sh_symbol">);</span> <span class="sh_comment">// Show reason only on hover</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>row <span class="sh_symbol">+</span> <span class="sh_string">'td.script-meat'</span><span class="sh_symbol">).</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'padding-bottom'</span><span class="sh_symbol">,</span><span class="sh_string">'0'</span><span class="sh_symbol">).</span><span class="sh_function">hover</span><span class="sh_symbol">(</span> <span class="sh_keyword">function</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.reason'</span><span class="sh_symbol">,</span> <span class="sh_keyword">this</span><span class="sh_symbol">).</span><span class="sh_function">removeAttr</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span><span class="sh_symbol">,</span> <span class="sh_keyword">function</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.reason'</span><span class="sh_symbol">,</span> <span class="sh_keyword">this</span><span class="sh_symbol">).</span><span class="sh_function">attr</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">,</span><span class="sh_string">''</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_symbol">);</span> <span class="sh_comment">// Hide the suspected scam if the cookie tells us the toggle is set to hide</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>cScamHide<span class="sh_symbol">)</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>row<span class="sh_symbol">).</span><span class="sh_function">attr</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">,</span><span class="sh_string">''</span><span class="sh_symbol">);</span> <span class="sh_comment">// Tag the suspected scam visually using our preset messages</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>row <span class="sh_symbol">+</span> <span class="sh_string">'a.title'</span><span class="sh_symbol">)</span> <span class="sh_symbol">.</span><span class="sh_function">css</span><span class="sh_symbol">(</span><span class="sh_string">'color'</span><span class="sh_symbol">,</span><span class="sh_string">'darkred'</span><span class="sh_symbol">)</span> <span class="sh_symbol">.</span><span class="sh_function">before</span><span class="sh_symbol">(</span>tag<span class="sh_symbol">)</span> <span class="sh_symbol">.</span><span class="sh_function">parent</span><span class="sh_symbol">().</span><span class="sh_function">children</span><span class="sh_symbol">(</span><span class="sh_string">'p.desc'</span><span class="sh_symbol">).</span><span class="sh_function">prepend</span><span class="sh_symbol">(</span>caution<span class="sh_symbol">);</span> <span class="sh_comment">// Set reason text</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'&action=subscribe'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'Contains url subscribe token [&action=subscribe].'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'/ajax/friends/lists/subscribe'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'Contains Facebook ajax subscribe code [/ajax/friends/lists/subscribe].'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'packer'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'Contains "Packer" hidden eval code [eval(p,a,c,k...)].'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'/ajax/follow/follow_profile.php'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'Contains Facebook ajax profile follow code [/ajax/follow/follow_profile.php]'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'scammer'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'This script was published by known scam or spam author '</span> <span class="sh_symbol">+</span> authorText<span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'facebook.com/plugins/like.php?href='</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'Contains Facebook "like" reference to specific pages [like *or* follow.php?href=].'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'paramsAdd'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'Contains Facebook friend add token for a specific user [&action=add_friend].'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'ultooNumber'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'Contains Ultoo.com code that may procure points for one particular mobile number.'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'ultooName'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'Contains Ultoo.com code that may procure points for one particular user name.'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'facebook post'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'Contains ajax post code that may post to a specific Facebook page.'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'facebook iframe'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'May contain spam/misleading Facebook iFrames or "Like" buttons.'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'prank'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'This script is advertised as a prank or similar. It is considered malicious even if its author does not intend harm to Userscripts.org users.'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'ask.fm /add'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'Contains code that may automatically add or follow specific Ask.fm pages.'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reason <span class="sh_symbol">==</span> <span class="sh_string">'ask.fm spam'</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> reason <span class="sh_symbol">=</span> <span class="sh_string">'Contains code that is likely duplicated from another script to contain a new author</span><span class="sh_specialchar">\'</span><span class="sh_string">s spam links.'</span><span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_comment">// Append reason text</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>reasonPre <span class="sh_symbol">!=</span> <span class="sh_string">'scammer'</span><span class="sh_symbol">)</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>row <span class="sh_symbol">+</span> <span class="sh_string">'span.reason'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">(</span><span class="sh_string">' Reason: '</span> <span class="sh_symbol">+</span> reason<span class="sh_symbol">);</span> <span class="sh_comment">// Append author name/ID</span> <span class="sh_keyword">var</span> designation <span class="sh_symbol">=</span> <span class="sh_symbol">(</span>reasonPre <span class="sh_symbol">==</span> <span class="sh_string">'scammer'</span><span class="sh_symbol">)</span> <span class="sh_symbol">?</span> <span class="sh_string">'Known Scammer'</span> <span class="sh_symbol">:</span> <span class="sh_string">'Author Name'</span><span class="sh_symbol">;</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>row <span class="sh_symbol">+</span> <span class="sh_string">'span.authorWarn'</span><span class="sh_symbol">).</span><span class="sh_function">html</span><span class="sh_symbol">(</span><span class="sh_string">' <span style="line-height:20px;font-weight:bold;color:darkred;"> '</span> <span class="sh_symbol">+</span> designation <span class="sh_symbol">+</span> <span class="sh_string">' • '</span> <span class="sh_symbol">+</span> <span class="sh_string">'<span style="color:darkblue">"<a style="color:darkblue;text-decoration:none;" href="'</span> <span class=" sh_symbol"="">+</a></span><a style="color:darkblue;text-decoration:none;" href="'</span> <span class=" sh_symbol"=""> location<span class="sh_symbol">.</span>protocol <span class="sh_symbol">+</span> <span class="sh_string">'//userscripts.org/users/'</span> <span class="sh_symbol">+</span> authorID <span class="sh_symbol">+</span> <span class="sh_string">'">'</span> <span class="sh_symbol">+</span> authorText <span class="sh_symbol">+</span> <span class="sh_string">'</span></a>"</span> • ID: <a style="color:darkred;text-decoration:none;" href="'</span> <span class=" sh_symbol"="">+</a></span><a style="color:darkred;text-decoration:none;" href="'</span> <span class=" sh_symbol"=""> location<span class="sh_symbol">.</span>protocol <span class="sh_symbol">+</span> <span class="sh_string">'//userscripts.org/users/'</span> <span class="sh_symbol">+</span> authorID <span class="sh_symbol">+</span> <span class="sh_string">'">'</span> <span class="sh_symbol">+</span> authorID <span class="sh_symbol">+</span> <span class="sh_string">'</span></a>'<span class="sh_symbol">);</span> <span class="sh_comment">// Increment the running count of detected scams</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.total'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">(</span><span class="sh_function">parseInt</span><span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.total:first'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">())</span> <span class="sh_symbol">+</span> <span class="sh_number">1</span><span class="sh_symbol">);</span> <span class="sh_comment">// If all results were hidden, proceed to following page of results</span> <span class="sh_keyword">if</span> <span class="sh_symbol">((!</span>cCont<span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'tr[id^="scripts-"]'</span><span class="sh_symbol">).</span><span class="sh_function">not</span><span class="sh_symbol">(</span><span class="sh_string">'[hidden]'</span><span class="sh_symbol">).</span>length <span class="sh_symbol">==</span> <span class="sh_number">0</span><span class="sh_symbol">))</span> <span class="sh_keyword">return</span> window<span class="sh_symbol">.</span>location<span class="sh_symbol">.</span>href <span class="sh_symbol">=</span> location<span class="sh_symbol">.</span>protocol <span class="sh_symbol">+</span> <span class="sh_string">'//userscripts.org'</span> <span class="sh_symbol">+</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'a.next_page'</span><span class="sh_symbol">).</span><span class="sh_function">attr</span><span class="sh_symbol">(</span><span class="sh_string">'href'</span><span class="sh_symbol">);</span> <span class="sh_comment">// In continuous mode, if filter resulted in too few results, fetch more even without a new scroll trigger</span> <span class="sh_comment">//if ((cCont) && ($('tr[id^="scripts-"]').not('[hidden]').length < 10)) scroll();</span> <span class="sh_keyword">if</span> <span class="sh_symbol">((</span>cCont<span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'div#root_footer:in-viewport'</span><span class="sh_symbol">).</span>length <span class="sh_symbol">></span> <span class="sh_number">0</span><span class="sh_symbol">))</span> <span class="sh_function">scroll</span><span class="sh_symbol">();</span> <span class="sh_cbracket">}</span> <span class="sh_comment">// Set the toggle link's click function</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'a.autoToggle'</span><span class="sh_symbol">).</span><span class="sh_function">click</span><span class="sh_symbol">(</span><span class="sh_keyword">function</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span> <span class="sh_function">toggleScams</span><span class="sh_symbol">(</span><span class="sh_keyword">true</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_comment">// Make sure the toggle setting is in effect in case a toggle click occurred during the loop</span> <span class="sh_function">toggleScams</span><span class="sh_symbol">(</span><span class="sh_keyword">false</span><span class="sh_symbol">);</span> <span class="sh_keyword">function</span> <span class="sh_function">toggleScams</span><span class="sh_symbol">(</span>click<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_comment">// Read our cookie to determine the current toggle setting</span> <span class="sh_function">readCookie</span><span class="sh_symbol">();</span> <span class="sh_comment">/* If toggleScams is running as a result of a toggle link click, toggle hide/show setting and hide or show the scams. </span> <span class="sh_comment"> If it's running initially (not the result of a click), simply hide/show scams based on the current setting. */</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>cScamHide<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>click<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span><span class="sh_function">showScams</span><span class="sh_symbol">(</span>click<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_cbracket">{</span><span class="sh_function">hideScams</span><span class="sh_symbol">(</span>click<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>click<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span><span class="sh_function">hideScams</span><span class="sh_symbol">(</span>click<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_cbracket">{</span><span class="sh_function">showScams</span><span class="sh_symbol">(</span>click<span class="sh_symbol">)</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">function</span> <span class="sh_function">hideScams</span><span class="sh_symbol">(</span>click<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'tr.scam'</span><span class="sh_symbol">).</span><span class="sh_function">attr</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">,</span><span class="sh_string">''</span><span class="sh_symbol">);</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.tog'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">);</span> <span class="sh_keyword">if</span> <span class="sh_symbol">((</span>cCont<span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">(</span><span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'div#root_footer:in-viewport'</span><span class="sh_symbol">).</span>length <span class="sh_symbol">></span> <span class="sh_number">0</span><span class="sh_symbol">))</span> <span class="sh_function">scroll</span><span class="sh_symbol">();</span> <span class="sh_comment">// If toggleScams is running as a result of a toggle link click, toggle the cookie appropriately</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>click<span class="sh_symbol">)</span> <span class="sh_function">GM_setValue</span><span class="sh_symbol">(</span><span class="sh_string">'hide'</span><span class="sh_symbol">,</span><span class="sh_string">'1'</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">function</span> <span class="sh_function">showScams</span><span class="sh_symbol">(</span>click<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'tr.scam'</span><span class="sh_symbol">).</span><span class="sh_function">removeAttr</span><span class="sh_symbol">(</span><span class="sh_string">'hidden'</span><span class="sh_symbol">);</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.tog'</span><span class="sh_symbol">).</span><span class="sh_function">text</span><span class="sh_symbol">(</span><span class="sh_string">'shown'</span><span class="sh_symbol">);</span> <span class="sh_comment">// If toggleScams is running as a result of a toggle link click, toggle the cookie appropriately</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>click<span class="sh_symbol">)</span> <span class="sh_function">GM_setValue</span><span class="sh_symbol">(</span><span class="sh_string">'hide'</span><span class="sh_symbol">,</span><span class="sh_string">'0'</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_comment">/* Auto-updater: Daily check. </span> <span class="sh_comment">If an update is found, update notice displays on the current and next two subsequent page loads, </span> <span class="sh_comment">then stops displaying again until following day. */</span> <span class="sh_comment">// If the auto-update cookie doesn't exist, create it.</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>cUpdate<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>$<span class="sh_symbol">.</span><span class="sh_function">cookie</span><span class="sh_symbol">(</span><span class="sh_string">'ScamFilterUpdate'</span><span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_keyword">null</span><span class="sh_symbol">)</span> $<span class="sh_symbol">.</span><span class="sh_function">cookie</span><span class="sh_symbol">(</span><span class="sh_string">'ScamFilterUpdate'</span><span class="sh_symbol">,</span> <span class="sh_string">'1'</span><span class="sh_symbol">,</span> <span class="sh_cbracket">{</span> expires<span class="sh_symbol">:</span> <span class="sh_number">1</span><span class="sh_symbol">,</span> path<span class="sh_symbol">:</span> <span class="sh_string">'/'</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_comment">// Convert the cookie's data into a number</span> <span class="sh_keyword">var</span> cUpdater <span class="sh_symbol">=</span> <span class="sh_function">parseInt</span><span class="sh_symbol">(</span>$<span class="sh_symbol">.</span><span class="sh_function">cookie</span><span class="sh_symbol">(</span><span class="sh_string">'ScamFilterUpdate'</span><span class="sh_symbol">));</span> <span class="sh_comment">// If the cookie showed a number less than 4, retrieve Scam Hider's remote meta data, which includes its version number</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>cUpdater <span class="sh_symbol"><</span> <span class="sh_number">4</span><span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_comment">// Retrieve the piece</span> $<span class="sh_symbol">.</span><span class="sh_function">ajax</span><span class="sh_symbol">(</span><span class="sh_cbracket">{</span> url<span class="sh_symbol">:</span> thisScriptMetaURL<span class="sh_symbol">,</span> dataType<span class="sh_symbol">:</span> <span class="sh_string">'text'</span><span class="sh_symbol">,</span> cache<span class="sh_symbol">:</span> <span class="sh_keyword">false</span><span class="sh_symbol">,</span> headers<span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>Range<span class="sh_symbol">:</span> <span class="sh_string">'bytes=-330'</span><span class="sh_cbracket">}</span><span class="sh_symbol">,</span> success<span class="sh_symbol">:</span> checkUpdates <span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">function</span> <span class="sh_function">checkUpdates</span><span class="sh_symbol">(</span>data<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_comment">// Extract Scam Hider's current version number from the retrieved data...</span> <span class="sh_keyword">var</span> currentVersion <span class="sh_symbol">=</span> <span class="sh_function">parseFloat</span><span class="sh_symbol">(</span>data<span class="sh_symbol">.</span><span class="sh_function">substr</span><span class="sh_symbol">(</span> data<span class="sh_symbol">.</span><span class="sh_function">search</span><span class="sh_symbol">(</span><span class="sh_regexp">/@version/</span><span class="sh_symbol">)</span> <span class="sh_symbol">+</span> <span class="sh_number">13</span><span class="sh_symbol">,</span> <span class="sh_number">5</span><span class="sh_symbol">));</span> <span class="sh_comment">// Debug offset:</span> <span class="sh_comment">//alert('Installed version: ' + GM_info.script.version + ' Latest version: ' + currentVersion + ' (' + data + ')');</span> <span class="sh_comment">// and compare it to the installed version number.</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>currentVersion <span class="sh_symbol">></span> GM_info<span class="sh_symbol">.</span>script<span class="sh_symbol">.</span>version<span class="sh_symbol">)</span><span class="sh_cbracket">{</span> <span class="sh_comment">// If the current version number retrieved is greater than the installed version number, show our update notice.</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'span.upd'</span><span class="sh_symbol">).</span><span class="sh_function">html</span><span class="sh_symbol">(</span>notify<span class="sh_symbol">);</span> <span class="sh_comment">// Set the notification link's tooltip to show installed + latest versions</span> <span class="sh_function">$</span><span class="sh_symbol">(</span><span class="sh_string">'a.notify'</span><span class="sh_symbol">).</span><span class="sh_function">attr</span><span class="sh_symbol">(</span><span class="sh_string">'title'</span><span class="sh_symbol">,</span><span class="sh_string">'Installed version: '</span> <span class="sh_symbol">+</span> GM_info<span class="sh_symbol">.</span>script<span class="sh_symbol">.</span>version <span class="sh_symbol">+</span> <span class="sh_string">' Latest version: '</span> <span class="sh_symbol">+</span> currentVersion<span class="sh_symbol">);</span> <span class="sh_comment">/* If the user doesn't update and loads another script listing page, increment the cookie's number.</span> <span class="sh_comment"> This lets the user see the update notice for 3 page loads total, then doesn't bother them again for another day</span> <span class="sh_comment"> (the cookie is set to expire in 24 hours). */</span> $<span class="sh_symbol">.</span><span class="sh_function">cookie</span><span class="sh_symbol">(</span><span class="sh_string">'ScamFilterUpdate'</span><span class="sh_symbol">,</span> cUpdater <span class="sh_symbol">+</span> <span class="sh_number">1</span><span class="sh_symbol">,</span> <span class="sh_cbracket">{</span> expires<span class="sh_symbol">:</span> <span class="sh_number">1</span><span class="sh_symbol">,</span> path<span class="sh_symbol">:</span> <span class="sh_string">'/'</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">function</span> <span class="sh_function">loadJQViewport</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span> <span class="sh_comment">/* Viewport - jQuery selectors for finding elements in viewport Copyright (c) 2008-2009 Mika Tuupola</span> <span class="sh_comment"> Licensed under the MIT license: </span><span class="sh_url"><a class="sh_url" href="http://www.opensource.org/licenses/mit-license.php">http://www.opensource.org/licenses/mit-license.php</a></span> <span class="sh_comment"> * Project home: </span><span class="sh_url"><a class="sh_url" href="http://www.appelsiini.net/projects/viewport">http://www.appelsiini.net/projects/viewport</a></span><span class="sh_comment"> </span> <span class="sh_comment"> $(":in-viewport") $(":below-the-fold") $(":above-the-top") $(":left-of-screen") $(":right-of-screen") */</span> <span class="sh_symbol">(</span><span class="sh_keyword">function</span><span class="sh_symbol">(</span>$<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> $<span class="sh_symbol">.</span>belowthefold <span class="sh_symbol">=</span> <span class="sh_keyword">function</span><span class="sh_symbol">(</span>element<span class="sh_symbol">,</span> settings<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> fold <span class="sh_symbol">=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>window<span class="sh_symbol">).</span><span class="sh_function">height</span><span class="sh_symbol">()</span> <span class="sh_symbol">+</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>window<span class="sh_symbol">).</span><span class="sh_function">scrollTop</span><span class="sh_symbol">();</span> <span class="sh_keyword">return</span> fold <span class="sh_symbol"><=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>element<span class="sh_symbol">).</span><span class="sh_function">offset</span><span class="sh_symbol">().</span>top <span class="sh_symbol">-</span> settings<span class="sh_symbol">.</span>threshold<span class="sh_symbol">;</span> <span class="sh_cbracket">}</span><span class="sh_symbol">;</span> $<span class="sh_symbol">.</span>abovethetop <span class="sh_symbol">=</span> <span class="sh_keyword">function</span><span class="sh_symbol">(</span>element<span class="sh_symbol">,</span> settings<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> top <span class="sh_symbol">=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>window<span class="sh_symbol">).</span><span class="sh_function">scrollTop</span><span class="sh_symbol">();</span> <span class="sh_keyword">return</span> top <span class="sh_symbol">>=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>element<span class="sh_symbol">).</span><span class="sh_function">offset</span><span class="sh_symbol">().</span>top <span class="sh_symbol">+</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>element<span class="sh_symbol">).</span><span class="sh_function">height</span><span class="sh_symbol">()</span> <span class="sh_symbol">-</span> settings<span class="sh_symbol">.</span>threshold<span class="sh_symbol">;</span> <span class="sh_cbracket">}</span><span class="sh_symbol">;</span> $<span class="sh_symbol">.</span>rightofscreen <span class="sh_symbol">=</span> <span class="sh_keyword">function</span><span class="sh_symbol">(</span>element<span class="sh_symbol">,</span> settings<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> fold <span class="sh_symbol">=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>window<span class="sh_symbol">).</span><span class="sh_function">width</span><span class="sh_symbol">()</span> <span class="sh_symbol">+</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>window<span class="sh_symbol">).</span><span class="sh_function">scrollLeft</span><span class="sh_symbol">();</span> <span class="sh_keyword">return</span> fold <span class="sh_symbol"><=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>element<span class="sh_symbol">).</span><span class="sh_function">offset</span><span class="sh_symbol">().</span>left <span class="sh_symbol">-</span> settings<span class="sh_symbol">.</span>threshold<span class="sh_symbol">;</span> <span class="sh_cbracket">}</span><span class="sh_symbol">;</span> $<span class="sh_symbol">.</span>leftofscreen <span class="sh_symbol">=</span> <span class="sh_keyword">function</span><span class="sh_symbol">(</span>element<span class="sh_symbol">,</span> settings<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> left <span class="sh_symbol">=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>window<span class="sh_symbol">).</span><span class="sh_function">scrollLeft</span><span class="sh_symbol">();</span> <span class="sh_keyword">return</span> left <span class="sh_symbol">>=</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>element<span class="sh_symbol">).</span><span class="sh_function">offset</span><span class="sh_symbol">().</span>left <span class="sh_symbol">+</span> <span class="sh_function">$</span><span class="sh_symbol">(</span>element<span class="sh_symbol">).</span><span class="sh_function">width</span><span class="sh_symbol">()</span> <span class="sh_symbol">-</span> settings<span class="sh_symbol">.</span>threshold<span class="sh_symbol">;</span> <span class="sh_cbracket">}</span><span class="sh_symbol">;</span> $<span class="sh_symbol">.</span>inviewport <span class="sh_symbol">=</span> <span class="sh_keyword">function</span><span class="sh_symbol">(</span>element<span class="sh_symbol">,</span> settings<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">return</span> <span class="sh_symbol">!</span>$<span class="sh_symbol">.</span><span class="sh_function">rightofscreen</span><span class="sh_symbol">(</span>element<span class="sh_symbol">,</span> settings<span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">!</span>$<span class="sh_symbol">.</span><span class="sh_function">leftofscreen</span><span class="sh_symbol">(</span>element<span class="sh_symbol">,</span> settings<span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">!</span>$<span class="sh_symbol">.</span><span class="sh_function">belowthefold</span><span class="sh_symbol">(</span>element<span class="sh_symbol">,</span> settings<span class="sh_symbol">)</span> <span class="sh_symbol">&&</span> <span class="sh_symbol">!</span>$<span class="sh_symbol">.</span><span class="sh_function">abovethetop</span><span class="sh_symbol">(</span>element<span class="sh_symbol">,</span> settings<span class="sh_symbol">);</span> <span class="sh_cbracket">}</span><span class="sh_symbol">;</span> $<span class="sh_symbol">.</span><span class="sh_function">extend</span><span class="sh_symbol">(</span>$<span class="sh_symbol">.</span>expr<span class="sh_symbol">[</span><span class="sh_string">':'</span><span class="sh_symbol">],</span> <span class="sh_cbracket">{</span> <span class="sh_string">"below-the-fold"</span><span class="sh_symbol">:</span> <span class="sh_keyword">function</span><span class="sh_symbol">(</span>a<span class="sh_symbol">,</span> i<span class="sh_symbol">,</span> m<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">return</span> $<span class="sh_symbol">.</span><span class="sh_function">belowthefold</span><span class="sh_symbol">(</span>a<span class="sh_symbol">,</span> <span class="sh_cbracket">{</span>threshold <span class="sh_symbol">:</span> <span class="sh_number">0</span><span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span><span class="sh_symbol">,</span> <span class="sh_string">"above-the-top"</span><span class="sh_symbol">:</span> <span class="sh_keyword">function</span><span class="sh_symbol">(</span>a<span class="sh_symbol">,</span> i<span class="sh_symbol">,</span> m<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">return</span> $<span class="sh_symbol">.</span><span class="sh_function">abovethetop</span><span class="sh_symbol">(</span>a<span class="sh_symbol">,</span> <span class="sh_cbracket">{</span>threshold <span class="sh_symbol">:</span> <span class="sh_number">0</span><span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span><span class="sh_symbol">,</span> <span class="sh_string">"left-of-screen"</span><span class="sh_symbol">:</span> <span class="sh_keyword">function</span><span class="sh_symbol">(</span>a<span class="sh_symbol">,</span> i<span class="sh_symbol">,</span> m<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">return</span> $<span class="sh_symbol">.</span><span class="sh_function">leftofscreen</span><span class="sh_symbol">(</span>a<span class="sh_symbol">,</span> <span class="sh_cbracket">{</span>threshold <span class="sh_symbol">:</span> <span class="sh_number">0</span><span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span><span class="sh_symbol">,</span> <span class="sh_string">"right-of-screen"</span><span class="sh_symbol">:</span> <span class="sh_keyword">function</span><span class="sh_symbol">(</span>a<span class="sh_symbol">,</span> i<span class="sh_symbol">,</span> m<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">return</span> $<span class="sh_symbol">.</span><span class="sh_function">rightofscreen</span><span class="sh_symbol">(</span>a<span class="sh_symbol">,</span> <span class="sh_cbracket">{</span>threshold <span class="sh_symbol">:</span> <span class="sh_number">0</span><span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span><span class="sh_symbol">,</span> <span class="sh_string">"in-viewport"</span><span class="sh_symbol">:</span> <span class="sh_keyword">function</span><span class="sh_symbol">(</span>a<span class="sh_symbol">,</span> i<span class="sh_symbol">,</span> m<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">return</span> $<span class="sh_symbol">.</span><span class="sh_function">inviewport</span><span class="sh_symbol">(</span>a<span class="sh_symbol">,</span> <span class="sh_cbracket">{</span>threshold <span class="sh_symbol">:</span> <span class="sh_number">0</span><span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span> <span class="sh_cbracket">}</span><span class="sh_symbol">)(</span>jQuery<span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_comment">// Add jQuery cookie functions: Makes the cookie functions above work. </span> <span class="sh_comment">// This must load above function use for Chrome/Tampermonkey support, so it's wrapped in a function called in the beginning.</span> <span class="sh_comment">/* jQuery Cookie Plugin v1.3.1 </span><span class="sh_url"><a class="sh_url" href="https://github.com/carhartl/jquery-cookie">https://github.com/carhartl/jquery-cookie</a></span> <span class="sh_comment"> * Copyright 2013 Klaus Hartl. Released under the MIT license */</span> <span class="sh_keyword">function</span> <span class="sh_function">loadJQcookies</span><span class="sh_symbol">()</span><span class="sh_cbracket">{</span> <span class="sh_symbol">(</span><span class="sh_keyword">function</span> <span class="sh_symbol">(</span>factory<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_keyword">typeof</span> define <span class="sh_symbol">===</span> <span class="sh_string">'function'</span> <span class="sh_symbol">&&</span> define<span class="sh_symbol">.</span>amd<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_comment">// AMD. Register as anonymous module.</span> <span class="sh_function">define</span><span class="sh_symbol">([</span><span class="sh_string">'jquery'</span><span class="sh_symbol">],</span> factory<span class="sh_symbol">);</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_cbracket">{</span> <span class="sh_comment">// Browser globals.</span> <span class="sh_function">factory</span><span class="sh_symbol">(</span>jQuery<span class="sh_symbol">);</span><span class="sh_cbracket">}</span> <span class="sh_cbracket">}</span><span class="sh_symbol">(</span><span class="sh_keyword">function</span> <span class="sh_symbol">(</span>$<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> pluses <span class="sh_symbol">=</span> <span class="sh_regexp">/\+/g</span><span class="sh_symbol">;</span> <span class="sh_keyword">function</span> <span class="sh_function">raw</span><span class="sh_symbol">(</span>s<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">return</span> s<span class="sh_symbol">;</span><span class="sh_cbracket">}</span> <span class="sh_keyword">function</span> <span class="sh_function">decoded</span><span class="sh_symbol">(</span>s<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">return</span> <span class="sh_function">decodeURIComponent</span><span class="sh_symbol">(</span>s<span class="sh_symbol">.</span><span class="sh_function">replace</span><span class="sh_symbol">(</span>pluses<span class="sh_symbol">,</span> <span class="sh_string">' '</span><span class="sh_symbol">));</span><span class="sh_cbracket">}</span> <span class="sh_keyword">function</span> <span class="sh_function">converted</span><span class="sh_symbol">(</span>s<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>s<span class="sh_symbol">.</span><span class="sh_function">indexOf</span><span class="sh_symbol">(</span><span class="sh_string">'"'</span><span class="sh_symbol">)</span> <span class="sh_symbol">===</span> <span class="sh_number">0</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_comment">// This is a quoted cookie as according to RFC2068, unescape</span> s <span class="sh_symbol">=</span> s<span class="sh_symbol">.</span><span class="sh_function">slice</span><span class="sh_symbol">(</span><span class="sh_number">1</span><span class="sh_symbol">,</span> <span class="sh_symbol">-</span><span class="sh_number">1</span><span class="sh_symbol">).</span><span class="sh_function">replace</span><span class="sh_symbol">(</span><span class="sh_regexp">/\\"/g</span><span class="sh_symbol">,</span> <span class="sh_string">'"'</span><span class="sh_symbol">).</span><span class="sh_function">replace</span><span class="sh_symbol">(</span><span class="sh_regexp">/\\\\/g</span><span class="sh_symbol">,</span> <span class="sh_string">'</span><span class="sh_specialchar">\\</span><span class="sh_string">'</span><span class="sh_symbol">);</span><span class="sh_cbracket">}</span> <span class="sh_keyword">try</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">return</span> config<span class="sh_symbol">.</span>json <span class="sh_symbol">?</span> JSON<span class="sh_symbol">.</span><span class="sh_function">parse</span><span class="sh_symbol">(</span>s<span class="sh_symbol">)</span> <span class="sh_symbol">:</span> s<span class="sh_symbol">;</span> <span class="sh_cbracket">}</span> <span class="sh_keyword">catch</span><span class="sh_symbol">(</span>er<span class="sh_symbol">)</span> <span class="sh_cbracket">{}}</span> <span class="sh_keyword">var</span> config <span class="sh_symbol">=</span> $<span class="sh_symbol">.</span>cookie <span class="sh_symbol">=</span> <span class="sh_keyword">function</span> <span class="sh_symbol">(</span>key<span class="sh_symbol">,</span> value<span class="sh_symbol">,</span> options<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_comment">// write</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>value <span class="sh_symbol">!==</span> undefined<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> options <span class="sh_symbol">=</span> $<span class="sh_symbol">.</span><span class="sh_function">extend</span><span class="sh_symbol">(</span><span class="sh_cbracket">{}</span><span class="sh_symbol">,</span> config<span class="sh_symbol">.</span>defaults<span class="sh_symbol">,</span> options<span class="sh_symbol">);</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_keyword">typeof</span> options<span class="sh_symbol">.</span>expires <span class="sh_symbol">===</span> <span class="sh_string">'number'</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> days <span class="sh_symbol">=</span> options<span class="sh_symbol">.</span>expires<span class="sh_symbol">,</span> t <span class="sh_symbol">=</span> options<span class="sh_symbol">.</span>expires <span class="sh_symbol">=</span> <span class="sh_keyword">new</span> <span class="sh_function">Date</span><span class="sh_symbol">();</span> t<span class="sh_symbol">.</span><span class="sh_function">setDate</span><span class="sh_symbol">(</span>t<span class="sh_symbol">.</span><span class="sh_function">getDate</span><span class="sh_symbol">()</span> <span class="sh_symbol">+</span> days<span class="sh_symbol">);</span><span class="sh_cbracket">}</span> value <span class="sh_symbol">=</span> config<span class="sh_symbol">.</span>json <span class="sh_symbol">?</span> JSON<span class="sh_symbol">.</span><span class="sh_function">stringify</span><span class="sh_symbol">(</span>value<span class="sh_symbol">)</span> <span class="sh_symbol">:</span> <span class="sh_function">String</span><span class="sh_symbol">(</span>value<span class="sh_symbol">);</span> <span class="sh_keyword">return</span> <span class="sh_symbol">(</span>document<span class="sh_symbol">.</span>cookie <span class="sh_symbol">=</span> <span class="sh_symbol">[</span> config<span class="sh_symbol">.</span>raw <span class="sh_symbol">?</span> key <span class="sh_symbol">:</span> <span class="sh_function">encodeURIComponent</span><span class="sh_symbol">(</span>key<span class="sh_symbol">),</span> <span class="sh_string">'='</span><span class="sh_symbol">,</span> config<span class="sh_symbol">.</span>raw <span class="sh_symbol">?</span> value <span class="sh_symbol">:</span> <span class="sh_function">encodeURIComponent</span><span class="sh_symbol">(</span>value<span class="sh_symbol">),</span> options<span class="sh_symbol">.</span>expires <span class="sh_symbol">?</span> <span class="sh_string">'; expires='</span> <span class="sh_symbol">+</span> options<span class="sh_symbol">.</span>expires<span class="sh_symbol">.</span><span class="sh_function">toUTCString</span><span class="sh_symbol">()</span> <span class="sh_symbol">:</span> <span class="sh_string">''</span><span class="sh_symbol">,</span> <span class="sh_comment">// use expires attribute, max-age is not supported by IE</span> options<span class="sh_symbol">.</span>path <span class="sh_symbol">?</span> <span class="sh_string">'; path='</span> <span class="sh_symbol">+</span> options<span class="sh_symbol">.</span>path <span class="sh_symbol">:</span> <span class="sh_string">''</span><span class="sh_symbol">,</span> options<span class="sh_symbol">.</span>domain <span class="sh_symbol">?</span> <span class="sh_string">'; domain='</span> <span class="sh_symbol">+</span> options<span class="sh_symbol">.</span>domain <span class="sh_symbol">:</span> <span class="sh_string">''</span><span class="sh_symbol">,</span> options<span class="sh_symbol">.</span>secure <span class="sh_symbol">?</span> <span class="sh_string">'; secure'</span> <span class="sh_symbol">:</span> <span class="sh_string">''</span> <span class="sh_symbol">].</span><span class="sh_function">join</span><span class="sh_symbol">(</span><span class="sh_string">''</span><span class="sh_symbol">));</span><span class="sh_cbracket">}</span> <span class="sh_comment">// read</span> <span class="sh_keyword">var</span> decode <span class="sh_symbol">=</span> config<span class="sh_symbol">.</span>raw <span class="sh_symbol">?</span> raw <span class="sh_symbol">:</span> decoded<span class="sh_symbol">;</span> <span class="sh_keyword">var</span> cookies <span class="sh_symbol">=</span> document<span class="sh_symbol">.</span>cookie<span class="sh_symbol">.</span><span class="sh_function">split</span><span class="sh_symbol">(</span><span class="sh_string">'; '</span><span class="sh_symbol">);</span> <span class="sh_keyword">var</span> result <span class="sh_symbol">=</span> key <span class="sh_symbol">?</span> undefined <span class="sh_symbol">:</span> <span class="sh_cbracket">{}</span><span class="sh_symbol">;</span> <span class="sh_keyword">for</span> <span class="sh_symbol">(</span><span class="sh_keyword">var</span> i <span class="sh_symbol">=</span> <span class="sh_number">0</span><span class="sh_symbol">,</span> l <span class="sh_symbol">=</span> cookies<span class="sh_symbol">.</span>length<span class="sh_symbol">;</span> i <span class="sh_symbol"><</span> l<span class="sh_symbol">;</span> i<span class="sh_symbol">++)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">var</span> parts <span class="sh_symbol">=</span> cookies<span class="sh_symbol">[</span>i<span class="sh_symbol">].</span><span class="sh_function">split</span><span class="sh_symbol">(</span><span class="sh_string">'='</span><span class="sh_symbol">);</span> <span class="sh_keyword">var</span> name <span class="sh_symbol">=</span> <span class="sh_function">decode</span><span class="sh_symbol">(</span>parts<span class="sh_symbol">.</span><span class="sh_function">shift</span><span class="sh_symbol">());</span> <span class="sh_keyword">var</span> cookie <span class="sh_symbol">=</span> <span class="sh_function">decode</span><span class="sh_symbol">(</span>parts<span class="sh_symbol">.</span><span class="sh_function">join</span><span class="sh_symbol">(</span><span class="sh_string">'='</span><span class="sh_symbol">));</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>key <span class="sh_symbol">&&</span> key <span class="sh_symbol">===</span> name<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> result <span class="sh_symbol">=</span> <span class="sh_function">converted</span><span class="sh_symbol">(</span>cookie<span class="sh_symbol">);</span> <span class="sh_keyword">break</span><span class="sh_symbol">;</span><span class="sh_cbracket">}</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(!</span>key<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> result<span class="sh_symbol">[</span>name<span class="sh_symbol">]</span> <span class="sh_symbol">=</span> <span class="sh_function">converted</span><span class="sh_symbol">(</span>cookie<span class="sh_symbol">);</span><span class="sh_cbracket">}}</span> <span class="sh_keyword">return</span> result<span class="sh_symbol">;</span><span class="sh_cbracket">}</span><span class="sh_symbol">;</span> config<span class="sh_symbol">.</span>defaults <span class="sh_symbol">=</span> <span class="sh_cbracket">{}</span><span class="sh_symbol">;</span> $<span class="sh_symbol">.</span>removeCookie <span class="sh_symbol">=</span> <span class="sh_keyword">function</span> <span class="sh_symbol">(</span>key<span class="sh_symbol">,</span> options<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>$<span class="sh_symbol">.</span><span class="sh_function">cookie</span><span class="sh_symbol">(</span>key<span class="sh_symbol">)</span> <span class="sh_symbol">!==</span> undefined<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_comment">// Must not alter options, thus extending a fresh object...</span> $<span class="sh_symbol">.</span><span class="sh_function">cookie</span><span class="sh_symbol">(</span>key<span class="sh_symbol">,</span> <span class="sh_string">''</span><span class="sh_symbol">,</span> $<span class="sh_symbol">.</span><span class="sh_function">extend</span><span class="sh_symbol">(</span><span class="sh_cbracket">{}</span><span class="sh_symbol">,</span> options<span class="sh_symbol">,</span> <span class="sh_cbracket">{</span> expires<span class="sh_symbol">:</span> <span class="sh_symbol">-</span><span class="sh_number">1</span> <span class="sh_cbracket">}</span><span class="sh_symbol">));</span> <span class="sh_keyword">return</span> <span class="sh_keyword">true</span><span class="sh_symbol">;</span><span class="sh_cbracket">}</span> <span class="sh_keyword">return</span> <span class="sh_keyword">false</span><span class="sh_symbol">;</span><span class="sh_cbracket">}</span><span class="sh_symbol">;</span><span class="sh_cbracket">}</span><span class="sh_symbol">));</span> <span class="sh_cbracket">}</span> <span class="sh_comment">// End jQuery Cookie Plugin *************************************************</span> <span class="sh_cbracket">}</span><span class="sh_symbol">);</span><br /><pre class="sh_javascript sh_sourceCode" id="source"><span class="sh_symbol"> </span></pre><br /></div><br /></span>,<span class="sh_string">" tr="" id=" </span><table class="wide forums"> <tbody><br /><tr id\="scripts\-/i</span><span class=" sh_symbol"=""></tr><br /></tbody></table><br /></div><br /></span></pre><br />http://userscripts.org/scripts/show/163038http://userscripts.org/scripts/review/163038