// ==UserScript==// @name vote// @namespace blog.h2ero.cn// @include http://pvote.a.mvote.net/*// @version 1// ==/UserScript==$(function(){if($('.opoutbar:visible').length!=0){functioneraseCookie(cookieName){//--- ONE-TIME INITS://--- Set possible domains. Omits some rare edge cases.?.vardomain=document.domain;vardomain2=document.domain.replace(/^www\./,'');vardomain3=document.domain.replace(/^(\w+\.)+?(\w+\.\w+)$/,'$2');;//--- Get possible paths for the current page:varpathNodes=location.pathname.split('/').map(function(pathWord){return'/'+pathWord;});varcookPaths=[''].concat(pathNodes.map(function(pathNode){if(this.pathStr){this.pathStr+=pathNode;}else{this.pathStr='; path=';return(this.pathStr+pathNode);}return(this.pathStr);}));(eraseCookie=function(cookieName){//--- For each path, attempt to delete the cookie.cookPaths.forEach(function(pathStr){//--- To delete a cookie, set its expiration date to a past value.vardiagStr=cookieName+'='+pathStr+'; expires=Thu, 01-Jan-1970 00:00:01 GMT;';document.cookie=diagStr;document.cookie=cookieName+'='+pathStr+'; domain='+domain+'; expires=Thu, 01-Jan-1970 00:00:01 GMT;';document.cookie=cookieName+'='+pathStr+'; domain='+domain2+'; expires=Thu, 01-Jan-1970 00:00:01 GMT;';document.cookie=cookieName+'='+pathStr+'; domain='+domain3+'; expires=Thu, 01-Jan-1970 00:00:01 GMT;';});})(cookieName);}//--- Loop through cookies and delete them.varcookieList=document.cookie.split(/;\s*/);for(varJ=cookieList.length-1;J>=0;--J){varcookieName=cookieList[J].replace(/\s*(\w+)=.+$/,'$1');eraseCookie(cookieName);}localStorage.clear();window.location='http://pvote.a.mvote.net/poll/930308e8-0a8e-4e26-6069-8776459497de.html?from=singlemessage&isappinstalled=0'}// $('.iCheck-helper',$('#opinput_1617180').parent()).click();$('html, body').animate({scrollTop:$('.votesubmitbutton').offset().top-200},2000);$("#captcha").attr("src","/plugin/securimage/securimage_show.php?"+Math.random());//$("#captcha").show();$("#captchaloading").show();console.log('clear 2 done')});
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.