// ==UserScript==
// @name delicious URL Clean
// @description delicious URL Clean
// @author NKid
// @version 2012-06-08
// @run-at document-end
// @include http://delicious.com/save?url=*
// ==/UserScript==
var argUrl=/url=(.*)&title/.exec(decodeURIComponent(location.search))[1], tmp;
if(argUrl.indexOf('utm_source')!=-1){
tmp=argUrl.replace(/(\?|&)utm_source.*/i,'');
}
else if((argUrl.indexOf('youtube.com')!=-1) && (/(feature|hd|NR|playnext|list|p)=.*?/.test(argUrl))){
tmp='http://www.youtube.com/watch?' + argUrl.replace(/.*(v=.{11}).*/i,'$1');
}
else if(/www\.mobile01\.com/.test(argUrl) && /&fp=/.test(argUrl)) {
tmp=argUrl.replace(/&fp=(\d{1})/,'');
}
else if((argUrl.indexOf('mobile01.com')!=-1) && (/&last=/.test(argUrl))){
tmp=argUrl.substring(0,argUrl.indexOf('&last'));
}
if(tmp.length != 0) location.assign(location.pathname+'?url='+encodeURIComponent(tmp)+'&title'+location.search.replace(/\?url.*?&title/,''));
相關文章:
[FireGestures] Copy Page URL to Clipboard (CLS URL)