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\/");
}