Skip to content

Commit dce45ee

Browse files
committed
fix
1 parent d03861d commit dce45ee

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Easy offline/Easy offline.user.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// @description:zh-TW 一鍵自動將磁鏈、bt種子或其他下載資源離綫下載至網槃
88
// @namespace http://tampermonkey.net/
99
// @require http://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.2/jquery.min.js
10-
// @version 1.0.43
10+
// @version 1.0.45
1111
// @author Hoothin
1212
// @mail rixixi@gmail.com
1313
// @include http*://*/*
@@ -171,7 +171,7 @@
171171
let siteConfig=sites[x];
172172
offNode.css("background-color","#"+siteConfig.bgColor).attr("title",i18n[siteConfig.name] ).attr("href", siteConfig.url);
173173
offNode.click(function(e){
174-
if(siteConfig.name!="xunlei")GM_setValue("eoUrl",getRightMagnetUrl(offUrl));
174+
if(siteConfig.name!="xunlei")GM_setValue("eoUrl",getRightUrl(offUrl));
175175
e.stopPropagation();
176176
});
177177
if(siteConfig.bgImg)offNode.css("background-image","url(\""+siteConfig.bgImg+"\")");
@@ -284,7 +284,7 @@
284284
}
285285
}
286286

287-
function getRightMagnetUrl(url){
287+
function getRightUrl(url){
288288
var newUrl = url;
289289
if(/^magnet/.test(url)){
290290
newUrl=newUrl.split("&")[0].substring(20);
@@ -293,6 +293,8 @@
293293
}else{
294294
newUrl=url;
295295
}
296+
}else if(/^\/\//.test(url)){
297+
newUrl=location.protocol+url;
296298
}
297299
return newUrl;
298300
}

0 commit comments

Comments
 (0)