Change code

这个提交包含在:
François Vieille 2016-05-01 22:30:38 +02:00
父节点 64175a664d
当前提交 e73c4d3e02
共有 2 个文件被更改,包括 3 次插入3 次删除

查看文件

@ -3,7 +3,7 @@
* - naive code -
*/
javascript:(function(r = "http://swapthatlink.com", c = document.location.href){
javascript:(function(r, c){
var l = Array.prototype.slice.call(document.getElementsByTagName('a')),
e = new RegExp("^(javascript|mailto|(https?)?" + c + "/?#)"),
f = false;
@ -17,4 +17,4 @@ javascript:(function(r = "http://swapthatlink.com", c = document.location.href){
}
document.location.href = r;
return;
})();
})("http://swapthatlink.com", document.location.href);

2
Js/anywhere.min.js vendored
查看文件

@ -1 +1 @@
javascript:(function(r="http://swapthatlink.com",c=document.location.href){var l=Array.prototype.slice.call(document.getElementsByTagName('a')),e=new RegExp("^(mailto|(https?)?"+c+"/?#)"),f=false;while(!f&l.length>0){i=Math.floor(Math.random()*l.length);if(e.test(l[i].href)||l[i].href==c)l.splice(i,1);else{r=l[i].href;f=true}}document.location.href=r;return})();
javascript:(function(t,e){for(var a=Array.prototype.slice.call(document.getElementsByTagName("a")),o=new RegExp("^(javascript|mailto|(https?)?"+e+"/?#)"),n=!1;!n&a.length>0;)i=Math.floor(Math.random()*a.length),o.test(a[i].href)||a[i].href==e?a.splice(i,1):(t=a[i].href,n=!0);document.location.href=t})("http://swapthatlink.com",document.location.href);