|
7 | 7 | // @description:zh-TW 一鍵自動將磁鏈、bt種子或其他下載資源離綫下載至網槃 |
8 | 8 | // @namespace http://tampermonkey.net/ |
9 | 9 | // @require http://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.2/jquery.min.js |
10 | | -// @version 1.0.42 |
| 10 | +// @version 1.0.43 |
11 | 11 | // @author Hoothin |
12 | 12 | // @mail rixixi@gmail.com |
13 | 13 | // @include http*://*/* |
|
57 | 57 | 3:{ |
58 | 58 | name:"furk", |
59 | 59 | url:"https://www.furk.net/users/files/add", |
60 | | - bgColor:"f1f1f1", |
| 60 | + bgColor:"fff", |
61 | 61 | hide:false, |
62 | 62 | bgImg:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAMAAABgZ9sFAAAAflBMVEX///+CuuaGv+rjXKniTaiDu+d3tufiXq/nUqxAn9+t1vGiz/FOnt/sj8nol8bhcLJRo97b7vp5uOpCoeGQw+m31/XW6/er0++Iwe330uZUpuHssNjni8Tqf7/o9Pn68PSUx+732eucyuvzzuJjq+H0v97sm8q12vDto8/rcrjt831UAAABmUlEQVRIx+2T6W6DMBCE8dr4aEgw0KS5kzZH2/d/we7aliJlN6KR+rNjgYwYfxrwuPrXXwkeaC7ba1nqU7YrWfV83N6rm95G7ZCWlNnL6Kfa20zBA7tNEl7KSsjl5In/rsBOnqArtfx1GGXVGH112Wwuq2KnMMDp2nnUtaquOsttchik15yeLGZ68tpp7403elXo4pZn5Ld3zpg03VWFjkOme51kcGj/nu1p7wF6QPU0cjKDVIyBRrfbtdptM4XYqYIoSKP+KHQ04X17wKfDF8JJYJUt9cqrVH2sUOg0hJ4Ju5rNRSWMIb9r70uA4a2lRRSrx9stDF6ne7tCrz12XbdfLPbdAicVCdFEr5gdQGq306Qt6wz5gR81+t2tmXI6SbLT5sx4ga1YMdNidM/sAMQXOmOoBVPxeMidaaUwFsSjbVBa+NS0RdyequgYXS0pjhSmlegWcKxfRbrmdFBwjpHbMblEV+cQwiDSnUBfD8PQNMDtVBpOH2IYhjVInZHosYkxBh7GGZEeGpRg161Ib0ITQhTCMPrz+gG1shF4koHETAAAAABJRU5ErkJggg==" |
63 | 63 | }, |
|
190 | 190 | break; |
191 | 191 | }*/ |
192 | 192 | offNodes.push(offNode); |
193 | | - if(siteConfig.hide)continue; |
| 193 | + if(siteConfig.hide || GM_getValue("eoHide"+siteConfig.name))continue; |
194 | 194 | parentDiv.prepend(offNode); |
195 | 195 | } |
196 | 196 | parentDiv.mouseover(function(e){ |
|
323 | 323 | <style> |
324 | 324 | .whx-btn{ |
325 | 325 | background-color:#3892ed; |
326 | | - transition:background-color 0.25s ease; |
| 326 | + transition:background-color 0.15s ease; |
327 | 327 | } |
328 | 328 | .whx-btn:hover{ |
329 | 329 | background-color:#83c1ff; |
|
335 | 335 | <div id="configContent" style="display: none;"> |
336 | 336 | <div style="width:300px;height:300px;position:fixed;left:50%;top:50%;margin-top:-150px;margin-left:-150px;z-index:100000;background-color:#ffffff;border:1px solid #afb3b6;border-radius:10px;opacity:0.95;filter:alpha(opacity=95);box-shadow:5px 5px 20px 0px #000;"> |
337 | 337 | <div style="text-align:center;font-size: 12px;margin-top: 28px;">自定义需要启用一键下载的链接正则,一行一条</div> |
338 | | - <textarea id="configInput" placeholder="例:http:.*\\.php\\?getRes=\\d+" style="position:absolute;left:20px;top:50px;width:260px;height:170px"></textarea> |
339 | | - <label style="position:absolute;left:60px;top:225px;"><input id="showType" type="checkbox"/>仅当鼠标经过时显示图标</label> |
| 338 | + <textarea id="configInput" placeholder="例:http:.*\\.php\\?getRes=\\d+" style="position:absolute;left:20px;top:50px;width:260px;height:150px"></textarea> |
| 339 | + <div id="icons" style="position:absolute;left:3px;top:202px"></div> |
| 340 | + <label style="position:absolute;left:60px;top:230px;"><input id="showType" type="checkbox"/>仅当鼠标经过时显示图标</label> |
340 | 341 | <button id="configSave" class="whx-btn" type="button" style="position:absolute;left:110px;top:260px;width:80px;height:30px;color:white;border-radius:5px;border:0px;outline:none;">设置</button> |
341 | 342 | <div id="configQuit" class="whx-btn" style="width:28px;height:28px;border-radius:14px;position:absolute;right:2px;top:2px;cursor:pointer;"> |
342 | 343 | <span style="height:28px;line-height:28px;display:block;color:#FFF;text-align:center;font-size:20px;">╳</span> |
|
347 | 348 | var configQuit=document.querySelector("#configQuit"); |
348 | 349 | var configSave=document.querySelector("#configSave"); |
349 | 350 | var showTypeCheck=document.querySelector("#showType"); |
| 351 | + var icons=$("#icons"); |
| 352 | + for(var x = 0; x < Object.keys(sites).length; x++){ |
| 353 | + let siteConfig=sites[x]; |
| 354 | + let icon=$("<div style='height:25px;width:25px;float:left;border-radius:50%;background-position:center;background-repeat:no-repeat;background-size:20px;margin-left:20px;cursor:pointer'></div>"); |
| 355 | + icon.css("background-color","#"+siteConfig.bgColor).attr("title",i18n[siteConfig.name] ); |
| 356 | + if(GM_getValue("eoHide"+siteConfig.name)){ |
| 357 | + icon.css("opacity","0.2"); |
| 358 | + } |
| 359 | + if(siteConfig.bgImg)icon.css("background-image","url(\""+siteConfig.bgImg+"\")"); |
| 360 | + icon.on("click", function(){ |
| 361 | + var eoHide=GM_getValue("eoHide"+siteConfig.name); |
| 362 | + GM_setValue("eoHide"+siteConfig.name, !eoHide); |
| 363 | + icon.css("opacity",eoHide?"1":"0.2"); |
| 364 | + }); |
| 365 | + icons.append(icon); |
| 366 | + } |
350 | 367 | configContent=document.querySelector("#configContent"); |
351 | 368 | configContent.style.display="block"; |
352 | 369 | if(GM_getValue("eoReg"))$(configInput).val(GM_getValue("eoReg").join("\n")); |
|
0 commit comments