Clean URL

it will remove coded links

当前为 2015-10-20 提交的版本,查看 最新版本

// ==UserScript==
// @name           Clean URL
// @author         h.zhuang
// @version        2015.05.28
// @description    it will remove coded links
// @lastchanges    added decodeURIComponent
// @updatetype     24
// @namespace      com.schrauger.fork.slickdeals-clean-url
// @homepage       https://github.com/schrauger/mint.com-customize-default-categories
// @include        http://slickdeals.net/*
// @include        https://slickdeals.net/*
// @include        http://www.fatwallet.com/*
// @include        https://www.fatwallet.com/*
// ==/UserScript==

var thisLink, allLinks,linkArray;
allLinks = document.getElementsByTagName('a');
for (var j = 0; j < allLinks.length; j++) {
    thisLink = allLinks[j];
    if(thisLink.href.indexOf('http') !=-1)
	{
	linkArray=thisLink.href.split('http');
thisLink.href=decodeURIComponent('http'+linkArray[linkArray.length-1]);
thisLink.href=thisLink.href.replace(/&amp;/g,'&');
	}
}