Wilser

resolved [Script] Clear the Cookies of the current site

8 posts in this topic

Posted (edited)

Please move this entry to the extensions section

Bookmarklet: 

Tittle: Clear Cookies

Script: 

javascript:void((function(){var cookie_list,sub_domain,location_pathname,cookie_index,cookie_count;cookie_count=0;cookie_list=document.cookie.split("; ");for(cookie_index=0;cookie_index<cookie_list.length&&cookie_list[cookie_index];cookie_index++){cookie_count++;for(sub_domain="."+location.host;sub_domain;sub_domain=sub_domain.replace(/^(?:\.|[^\.]+)/,"")){for(location_pathname=location.pathname;location_pathname;location_pathname=location_pathname.replace(/.$/,"")){document.cookie=(cookie_list[cookie_index]+"; domain="+sub_domain+"; path="+location_pathname+"; expires="+new Date((new Date()).getTime()-1e11).toGMTString());}}}alert("Expired "+cookie_count+" cookies");})())

 

Edited by Wilser

Share this post


Link to post
Share on other sites

Hi Wilser, 

I tried the same as you but it works. So could you help me to check if I set the bookmarklet right?

I copied the script you provide here:

QQ截图20170309110111.png

Share this post


Link to post
Share on other sites

Confirmed here as well.

Share this post


Link to post
Share on other sites
11 minutes ago, BugSir006 said:

Confirmed now.

Here another video:

 

1 person likes this

Share this post


Link to post
Share on other sites
2 hours ago, Wilser said:

Here another video:

Thx! Very clear!

Share this post


Link to post
Share on other sites

Hi Wilser, our testers have confirmed and reported this bug to programmer already.

BTW, every time we run this bookmarklet, my computer will get frozen. Is it the same case on your device?

Share this post


Link to post
Share on other sites

Posted (edited)

On 9/3/2017 at 10:02 PM, BugSir006 said:

I tried the same as you but it works. So could you help me to check if I set the bookmarklet right?

@BugSir006 Yes, but I think it's a javascript code problem. Because I've regenerated the code and now works fine, please move this entry to the extensions section or remove it. :)

New Bookmarklet to clear the cookies of the current site:

javascript:void((function(){var cookie_list,sub_domain,location_pathname,cookie_index,cookie_count;cookie_count=0;cookie_list=document.cookie.split("; ");for(cookie_index=0;cookie_index<cookie_list.length&&cookie_list[cookie_index];cookie_index++){cookie_count++;for(sub_domain="."+location.host;sub_domain;sub_domain=sub_domain.replace(/^(?:\.|[^\.]+)/,"")){for(location_pathname=location.pathname;location_pathname;location_pathname=location_pathname.replace(/.$/,"")){document.cookie=(cookie_list[cookie_index]+"; domain="+sub_domain+"; path="+location_pathname+"; expires="+new Date((new Date()).getTime()-1e11).toGMTString());}}}alert("Expired "+cookie_count+" cookies");})())

 

Edited by Wilser
1 person likes this

Share this post


Link to post
Share on other sites