0
我需要的Greasemonkey脚本找到像所有链接:的Greasemonkey脚本重写链接
http://legendas.tv/download/545832dfb67eb/American_Dad/American_Dad_S11E02_HDTV_x264_LOL_AFG_FUM_DIMENSION
和重写他们这样的:
http://legendas.tv/downloadarquivo/545832dfb67eb
这是我的剧本,但它不是加工。
// ==UserScript==
// @name LTV
// @namespace legendas.tv
// @include http://legendas.tv
// @version 1
// @grant none
// ==/UserScript==
var links = document.getElementsByTagName("*"); //array
var regex = /^(http:\/\/)(legendas\.tv\/download\/)(.{13})(.*)$/i;
for (var i=0,imax=links.length; i<imax; i++) {
links[i].href = links[i].href.replace(regex,"$1.legendas.tv\/downloadarquivo\/$3\/");
}