modified: myjupyterlab.sh
[GalaxyCodeBases.git] / etc / Chrome / 115 / firefox / data / js / 115.js
blobf8dbd55ccc587864a9b0f73859c035d4f1c94171
1 // ==UserScript==
2 // @name 115网盘aria2导出工具
3 // @author acgotaku311
4 // @description 一个方便把115网盘导出到Aria2rpc的脚本。
5 // @encoding utf-8
6 // @include http://*.115.com/*
7 // @run-at document-end
8 // @version 0.1.4
9 // ==/UserScript==
10 var pan_115 = function(cookies) {
11 var version = "0.1.4";
12 var update_date = "2016/02/09";
13 var pan = (function() {
14 //type : inf err war
15 var SetMessage = function(msg, type) {
16 Core.MinMessage.Show({
17 text: msg,
18 type: type,
19 timeout: 2000
20 });
22 var auth = null; //是否设置用户名密码验证 设置的话变为auth赋值
23 var HttpSendRead = function(info) {
24 var http = new XMLHttpRequest();
25 var contentType = "\u0061\u0070\u0070\u006c\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u002d\u0077\u0077\u0077\u002d\u0066\u006f\u0072\u006d\u002d\u0075\u0072\u006c\u0065\u006e\u0063\u006f\u0064\u0065\u0064\u003b\u0020\u0063\u0068\u0061\u0072\u0073\u0065\u0074\u003d\u0055\u0054\u0046\u002d\u0038";
26 var timeout = 3000;
27 var deferred = jQuery.Deferred();
28 if (info.contentType != null) {
29 contentType = info.contentType;
31 if (info.timeout != null) {
32 timeout = info.timeout;
34 var timeId = setTimeout(httpclose, timeout);
35 function httpclose() {
36 http.abort();
38 deferred.promise(http);
39 http.onreadystatechange = function() {
40 if (http.readyState == 4) {
41 if ((http.status == 200 && http.status < 300) || http.status == 304) {
42 clearTimeout(timeId);
43 if (info.dataType == "json") {
44 deferred.resolve(JSON.parse(http.responseText), http.status, http);
46 else if (info.dataType == "SCRIPT") {
47 // eval(http.responseText);
48 deferred.resolve(http.responseText, http.status, http);
51 else {
52 clearTimeout(timeId);
53 deferred.reject(http, http.statusText, http.status);
58 http.open(info.type, info.url, true);
59 http.setRequestHeader("Content-type", contentType);
60 for (h in info.headers) {
61 if (info.headers[h]) {
62 http.setRequestHeader(h, info.headers[h]);
65 if (info.type == "POST") {
66 http.send(info.data);
68 else {
69 http.send();
71 return http;
73 //设置aria2c下载设置的Header信息
74 var combination = {
75 header: function(type) {
76 var addheader = [];
77 var UA = $("#setting_aria2_useragent_input").val() || "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 115Browser/5.1.3";
78 var headers = $("#setting_aria2_headers").val();
79 var referer = $("#setting_aria2_referer_input").val() || "http://115.com/";
80 addheader.push("User-Agent: " + UA);
81 // var baidu_cookies=JSON.parse(cookies);
82 // var format_cookies=[];
83 // for(var i=0;i<baidu_cookies.length;i++){
84 // for(var key in baidu_cookies[i]){
85 // // addheader.push("Cookie: " + key +"=" +baidu_cookies[i][key]);
86 // format_cookies.push(key +"=" +baidu_cookies[i][key]);
87 // }
88 // }
89 // addheader.push("Cookie: " + format_cookies.join(";"));
90 addheader.push("Referer: " + referer);
91 if (headers) {
92 var text = headers.split("\n");
93 for (var i = 0; i < text.length; i++) {
94 addheader.push(text[i]);
97 var header = "";
98 if (type == "aria2c_line") {
99 for (var i = 0; i < addheader.length; i++) {
100 header += " --header " + JSON.stringify(addheader[i]) + " ";
102 return header;
103 } else if (type == "aria2c_txt") {
104 for (var i = 0; i < addheader.length; i++) {
105 header += " header=" + (addheader[i]) + " \n";
107 return header;
108 } else if (type == "idm_txt") {
109 for (var i = 0; i < addheader.length; i++) {
110 header += " header=" + (addheader[i]) + " \n";
112 return header;
113 } else {
114 return addheader;
119 var css = function() {/*
120 .btn-aria2c{
121 position: relative;
122 top:2px;
123 float: right;
124 margin-right: 10px;
125 margin-left: 10px;
126 padding: 0 10px 0 10px;
127 line-height: 30px;
128 font-size: 14px;
129 color: white;
130 background: #2b91e3;
131 border-radius: 3px;
132 cursor: pointer;
133 z-index:100;
135 .btn-txt{
136 position: relative;
137 top:2px;
138 float: right;
139 margin-right: 10px;
140 padding: 0 10px 0 10px;
141 line-height: 30px;
142 font-size: 14px;
143 color: white;
144 background: #2b91e3;
145 border-radius: 3px;
146 cursor: pointer;
147 z-index:100;
150 li[rel="item"]:hover .show-export-button {
151 display: block;
152 cursor: pointer;
153 background:#FFD;
156 }.toString().slice(15, -4);
157 var url = (localStorage.getItem("rpc_url") || "http://localhost:6800/jsonrpc") + "?tm=" + (new Date().getTime().toString());
158 return {
159 //初始化按钮和一些事件
160 init: function() {
161 var self = this;
162 self.set_down_url();
163 self.set_btn();
164 self.set_config_ui();
165 self.set_config();
166 SetMessage("载入成功!", "inf");
168 set_btn:function(){
169 //设置导出按钮的触发 js_top_panel_box
170 //设置 设置按钮
171 var self = this;
172 document.querySelector("iframe[rel='wangpan']").addEventListener('load',function(){
173 top_panel_box_btn();
175 main_page_setting_btn();
176 function main_page_setting_btn(){
177 var setting_div=$("<a>").text("插件设置").attr("href","javascript:;");
178 var main_setting_div=$("<a>").text("插件设置").attr("href","javascript:;");
179 main_setting_div.attr("id","main_setting_div");
180 if(!document.querySelector("a[id='main_setting_div']")){
181 main_setting_div.appendTo($(document.querySelector("div[id='js_main_container']")).find(".tup-logout"));
182 main_setting_div.on('click',function(){
183 $("#setting_div").show();
184 $("#setting_divtopmsg").html("");
185 self.set_center($("#setting_div"));
189 function top_panel_box_btn(){
190 var root=document.querySelector("iframe[rel='wangpan']").contentDocument;
191 var setting_div=$("<a>").text("插件设置").attr("href","javascript:;");
192 var main_setting_div=$("<a>").text("插件设置").attr("href","javascript:;");
193 main_setting_div.attr("id","main_setting_div");
194 setting_div.appendTo($(root).find(".tup-logout"));
195 if(!document.querySelector("a[id='main_setting_div']")){
196 main_setting_div.appendTo($(document.querySelector("div[id='js_main_container']")).find(".tup-logout"));
197 main_setting_div.on('click',function(){
198 $("#setting_div").show();
199 $("#setting_divtopmsg").html("");
200 self.set_center($("#setting_div"));
203 setting_div.on('click',function(){
204 $("#setting_div").show();
205 $("#setting_divtopmsg").html("");
206 self.set_center($("#setting_div"));
208 $(root).find(".file-path").after($("<div>").text("RPC下载").addClass("btn-aria2c").on('click',function(){
209 self.aria2_export(true);
210 }));
211 $(root).find(".file-path").after($("<div>").text("导出下载").addClass("btn-txt").on('click',function(){
212 self.aria2_download();
213 self.aria2_export(false);
214 }));
215 var style = document.createElement('style');
216 style.setAttribute('type', 'text/css');
217 style.textContent = css;
218 root.head.appendChild(style);
221 set_config_ui:function(){
222 var self = this;
223 var setting_div = document.createElement("div");
224 setting_div.className = "download-mgr-dialog dialog-box";
225 setting_div.id = "setting_div";
226 var html_ = [
227 '<h2 class="dialog-title" ><span rel="base_title">导出设置</span><div class="dialog-handle"><a href="javascript:;" class="diag-close" btn="close">关闭</a></div></h2>',
228 '<div style=" margin: 20px 10px 10px 10px; ">',
229 '<div id="setting_divtopmsg" style="position:absolute; margin-top: -18px; margin-left: 10px; color: #E15F00;"></div>',
230 '<table id="setting_div_table" >',
231 '<tbody>',
232 '<tr><td width="100"><label>ARIA2 RPC:</label></td><td><input id="rpc_input" type="text" class="input-large"></td></tr>',
233 '<tr><td><label>RPC访问设置</label></td><td><input id="rpc_distinguish" type="checkbox"></td></tr>',
234 '<tr><td><label >RPC 用户名:</label></td><td><input type="text" id="rpc_user" disabled="disabled" class="input-small"></td></tr>',
235 '<tr><td><label>RPC 密码:</label></td><td><input type="text" id="rpc_pass" disabled="disabled" class="input-small"></td></tr>',
236 '<tr><td><label>Secret Token:</label></td><td><input type="text" id="rpc_token" class="input-small"><div style="position:absolute; margin-top: -20px; right: 20px;"><a id="send_test" type="0" href="javascript:;" >测试连接,成功显示版本号。</a></div></td></tr>',
237 '<tr><td><label>下载路径:</label></td><td><input type="text" placeholder="只能设置为绝对路径" id="setting_aria2_dir" class="input-large"></td></tr>',
238 '<tr><td><label>User-Agent :</label></td><td><input type="text" id="setting_aria2_useragent_input" class="input-large"></td></tr>',
239 '<tr><td><label>Referer :</label></td><td><input type="text" id="setting_aria2_referer_input" class="input-large"></td></tr>',
240 '<tr><td colspan="2"><div style="color: #656565;">Headers<label style="margin-left: 65px;">※使用回车分隔每个headers。</label></div><li class="b-list-item separator-1"></li></td></tr>',
241 '<tr><td><label>headers :</label></td><td><textarea id="setting_aria2_headers" ></textarea></td></tr>',
242 '</tbody>',
243 '</table>',
244 '<div style="margin-top:10px;">',
245 '<div id="copyright">© Copyright <a href="https://github.com/acgotaku/115">雪月秋水 </a> Version:' + version + ' 更新日期: ' + update_date + ' </div>',
246 '<div style="margin-left:20px; display:inline-block"><a href="javascript:;" id="apply" class="button" ><b>应用</b></a></div>',
247 '</div>',
248 '</div>'
250 setting_div.innerHTML = html_.join("");
251 document.body.appendChild(setting_div);
252 $(".diag-close").click(function() {
253 $("#setting_div").hide();
255 $("#apply").click(function() {
256 self.get_config();
257 $("#setting_divtopmsg").html("设置已保存.");
259 $("#send_test").click(function() {
260 self.get_version();
262 $("#rpc_distinguish").change(function() {
263 if ($(this).is(":checked")) {
264 $("#rpc_user").removeAttr("disabled").css("background-color", "#FFF");
265 $("#rpc_pass").removeAttr("disabled").css("background-color", "#FFF");
266 } else {
267 $("#rpc_user").attr({"disabled": "disabled"}).css("background-color", "#eee");
268 $("#rpc_pass").attr({"disabled": "disabled"}).css("background-color", "#eee");
273 //填充已经设置的配置数据
274 set_config: function() {
275 $("#rpc_input").val((localStorage.getItem("rpc_url") || "http://localhost:6800/jsonrpc"));
276 $("#rpc_token").val(localStorage.getItem("rpc_token"));
277 $("#setting_aria2_dir").val(localStorage.getItem("rpc_dir"));
278 $("#setting_aria2_useragent_input").val(localStorage.getItem("UA") || "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 115Browser/5.1.3");
279 $("#setting_aria2_referer_input").val(localStorage.getItem("referer") || "http://115.com/");
280 $("#setting_aria2_headers").val(localStorage.getItem("rpc_headers"));
282 if (localStorage.getItem("auth") == "true") {
283 var rpc_user = localStorage.getItem("rpc_user");
284 var rpc_pass = localStorage.getItem("rpc_pass");
285 $("#rpc_user").val(rpc_user);
286 $("#rpc_pass").val(rpc_pass);
287 $("#rpc_distinguish").prop('checked', true).trigger("change");
288 auth = "Basic " + btoa(rpc_user + ":" + rpc_pass);
290 else {
291 $("#rpc_user, #rpc_pass").val("");
294 //保存配置数据
295 get_config: function() {
296 var rpc_url = $("#rpc_input").val();
297 if (rpc_url) {
298 localStorage.setItem("rpc_url", rpc_url);
299 url = rpc_url + "?tm=" + (new Date().getTime().toString());
301 localStorage.setItem("UA", document.getElementById("setting_aria2_useragent_input").value || "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 115Browser/5.1.3");
302 if ($("#rpc_distinguish").prop('checked') == true) {
303 localStorage.setItem("rpc_user", $("#rpc_user").attr("value"));
304 localStorage.setItem("rpc_pass", $("#rpc_pass").attr("value"));
305 localStorage.setItem("auth", true);
306 auth = "Basic " + btoa($("#rpc_user").attr("value") + ":" + $("#rpc_pass").attr("value"));
307 } else {
308 localStorage.setItem("auth", false);
309 localStorage.setItem("rpc_user", null);
310 localStorage.setItem("rpc_pass", null);
312 localStorage.setItem("rpc_token", $("#rpc_token").val());
313 localStorage.setItem("rpc_dir", $("#setting_aria2_dir").val());
314 localStorage.setItem("rpc_headers", $("#setting_aria2_headers").val());
315 localStorage.setItem("referer", $("#setting_aria2_referer_input").val());
317 set_center:function(obj){
318 var screenWidth = $(window).width(), screenHeight = $(window).height();
319 var scrolltop = $(document).scrollTop();
320 var objLeft = (screenWidth - obj.width())/2 ;
321 var objTop = (screenHeight - obj.height())/2 + scrolltop;
322 obj.css({left: objLeft + 'px', top: objTop + 'px'});
324 getFileInfo:function(pick_code,method,path){
325 var self=this;
327 DownBridge.getFileUrl(pick_code,function(data){
328 var file_list=[];
329 file_list.push({"name": (path||"")+$('<textarea />').html(data.file_name).text(), "link": data.file_url});
330 if(method){
331 self.aria2_rpc(file_list);
332 }else{
333 $("#download_ui").show();
334 self.aria2_data(file_list);
337 });
339 //115下载核心功能 导出
340 aria2_export:function(method){
341 var self=this;
342 var root=document.querySelector("iframe[rel='wangpan']").contentDocument;
343 $(root).find('li[rel="item"][file_type="1"]').each(function(){
344 if($(this).children().eq(3).prop('checked') == true){
345 var pick_code = $(this).attr('pick_code');
346 self.getFileInfo(pick_code,method);
349 $(root).find('li[rel="item"][file_type="0"]').each(function(){
350 if($(this).children().eq(2).prop('checked') == true){
351 var cate_id = $(this).attr('cate_id');
352 DownBridge.getFileList(cate_id,function(data){
353 var list =data.data;
354 for(var i=0;i<list.length;i++){
355 if(list[i].sha){
356 self.getFileInfo(list[i].pc,method,data.path[data.path.length-1].name+"/");
357 }else{
358 var dir_level=data.path.length-1;
359 self.get_all_dir(list[i].cid,dir_level,method);
366 //递归下载
367 get_all_dir:function(cid,dir_level,method){
368 var self=this;
369 DownBridge.getFileList(cid,function(data){
370 var list =data.data;
371 var path="";
372 for(var i=dir_level;i<data.path.length;i++){
373 path+=data.path[i].name+"/";
375 for(var i=0;i<list.length;i++){
376 if(list[i].sha){
377 self.getFileInfo(list[i].pc,method,path);
378 }else{
379 self.get_all_dir(list[i].cid,dir_level,method);
384 //aria2导出下载界面以及事件绑定
385 aria2_download: function() {
386 if ($("#download_ui").length == 0) {
387 var download_ui = $("<div>").attr("id", "download_ui").addClass("download-mgr-dialog dialog-box").html('<h2 class="dialog-title" ><span rel="base_title">ARIA2导出</span><div class="dialog-handle"><a href="javascript:;" class="diag-close" btn="close">关闭</a></div></h2>');
388 var content_ui = $("<div>").addClass("content").attr("id", "content_ui").appendTo(download_ui);
389 download_ui.appendTo($("body"));
390 content_ui.empty();
391 var download_menu = $("<div>").css({"display": "block", "margin-bottom": "10px"}).appendTo(content_ui);
392 var aria2c_btn = $("<a>").attr("id", "aria2c_btn").attr({"href": "data:text/plain;charset=utf-8,", "download": "aria2c.down", "target": "_blank"}).addClass("new-btn").html('<b>存为aria2文件</b>').appendTo(download_menu);
393 var idm_btn = $("<a>").attr("id", "idm_btn").attr({"href": "data:text/plain;charset=utf-8,", "download": "idm.txt", "target": "_blank"}).addClass("new-btn").html('<b>存为IDM文件</b>').appendTo(download_menu);
394 var download_txt_btn = $("<a>").attr("id", "download_txt_btn").attr({"href": "data:text/plain;charset=utf-8,", "download": "download_link.down", "target": "_blank"}).addClass("new-btn").html('<b>保存下载链接</b>').appendTo(download_menu);
395 var download_link = $("<textarea>").attr("wrap", "off").attr("id", "download_link").css({"white-space": "nowrap", "width": "100%", "overflow": "scroll", "height": "180px"});
396 download_link.appendTo(content_ui);
397 $(".diag-close").click(function() {
398 download_ui.hide();
400 } else {
401 $("#aria2c_btn, #idm_btn, #download_txt_btn").attr("href", "data:text/plain;charset=utf-8,");
402 $("#download_link").val("");
405 //导出填充数据和显示数据
406 aria2_data: function(file_list) {
407 var files = [];
408 var aria2c_txt = [];
409 var idm_txt = [];
410 var down_txt = [];
411 if (file_list.length > 0) {
412 var length = file_list.length;
413 for (var i = 0; i < length; i++) {
414 files.push("aria2c -c -s10 -k1M -x10 -o " + JSON.stringify(file_list[i].name) + combination.header('aria2c_line') + " " + JSON.stringify(file_list[i].link) + "\n");
415 aria2c_txt.push([
416 file_list[i].link,
417 combination.header("aria2c_txt"),
418 ' out=' + file_list[i].name,
419 ' continue=true',
420 ' max-connection-per-server=10',
421 ' split=10',
422 '\n'
423 ].join('\n'));
424 idm_txt.push([
425 '<',
426 file_list[i].link,
427 ' cookie: ' + cookies,
428 ' out=' + file_list[i].name,
429 ' >'
430 ].join('\r\n'));
431 down_txt.push([file_list[i].link, ' '].join('\n'));
433 $("#aria2c_btn").attr("href", $("#aria2c_btn").attr("href") + encodeURIComponent(aria2c_txt.join("")));
434 $("#idm_btn").attr("href", $("#idm_btn").attr("href") + encodeURIComponent(idm_txt.join("")));
435 $("#download_txt_btn").attr("href", $("#download_txt_btn").attr("href") + encodeURIComponent(down_txt.join("")));
436 $("#download_link").val($("#download_link").val() + files.join(""));
437 $("#download_ui").show();
438 this.set_center($("#download_ui"));
442 set_down_url:function(){
443 var self=this;
444 DownBridge={};
445 $('<iframe>').attr('src', '//webapi.115.com/bridge_2.0.html?namespace=DownBridge&api=jQuery').css({
446 width: 0,
447 height: 0,
448 border: 0,
449 padding: 0,
450 margin: 0,
451 position: 'absolute',
452 top: '-99999px'
453 }).one('load',function(){
454 window.DownBridge.getFileUrl=function(pickcode,callback){
455 this.jQuery.get('//webapi.115.com/files/download?pickcode=' + pickcode, function (data) {
456 callback(data);
457 }, 'json');
459 window.DownBridge.getFileList=function(cate_id,callback){
460 this.jQuery.get('//webapi.115.com/files?aid=1&limit=1000&show_dir=1&cid=' + cate_id, function (data) {
461 callback(data);
462 }, 'json');
464 }).appendTo('html');
466 //获取aria2c的版本号用来测试通信
467 get_version: function() {
468 var data = {
469 "jsonrpc": "2.0",
470 "method": "aria2.getVersion",
471 "id": 1,
472 "params": []
474 if ($("#rpc_token").val()) {
475 data.params.unshift("token:" + $("#rpc_token").val());
477 var parameter = {'url': url, 'dataType': 'json', type: 'POST', data: JSON.stringify(data), 'headers': {'Authorization': auth}};
478 HttpSendRead(parameter)
479 .done(function(xml, textStatus, jqXHR) {
480 $("#send_test").html("ARIA2\u7248\u672c\u4e3a\uff1a\u0020" + xml.result.version);
482 .fail(function(jqXHR, textStatus, errorThrown) {
483 $("#send_test").html("错误,请查看是否开启Aria2");
486 //封装rpc要发送的数据
487 aria2_rpc: function(file_list) {
488 var self = this;
489 if (file_list.length > 0) {
490 var length = file_list.length;
491 for (var i = 0; i < length; i++) {
492 var rpc_data = {
493 "jsonrpc": "2.0",
494 "method": "aria2.addUri",
495 "id": new Date().getTime(),
496 "params": [[file_list[i].link], {
497 "out": file_list[i].name,
498 "dir":$("#setting_aria2_dir").val()||null,
499 "header": combination.header()
503 if ($("#rpc_token").val()) {
504 rpc_data.params.unshift("token:" + $("#rpc_token").val());
506 self.aria2send_data(rpc_data);
510 //和aria2c通信
511 aria2send_data: function(data) {
512 var parameter = {'url': url, 'dataType': 'json', type: 'POST', data: JSON.stringify(data), 'headers': {'Authorization': auth}};
513 HttpSendRead(parameter)
514 .done(function(json, textStatus, jqXHR) {
515 SetMessage("下载成功!赶紧去看看吧~", "inf");
518 .fail(function(jqXHR, textStatus, errorThrown) {
519 SetMessage("下载失败!是不是没有开启aria2?", "err");
523 })();
524 pan.init();
527 var setting_css= function() {/*
528 .download-mgr-dialog{
529 z-index: 1000000099;
530 position: fixed;
531 background: #FFF;
532 width:580px;
533 display:none;
534 font-family: tahoma, arial, 宋体, 'Microsoft Yahei', Simsun;
536 #setting_div_table input{
537 border: 1px solid #C6C6C6;
538 box-shadow: 0 0 3px #C6C6C6;
539 -webkit-box-shadow: 0 0 3px #C6C6C6;
540 height:18px;
542 .input-large{
543 width:90%;
545 .input-small{
546 width:150px;
548 .new-btn{
549 position: relative;
550 display: inline-block;
551 height: 30px;
552 padding: 0 10px 0 10px;
553 line-height: 30px;
554 text-align: center;
555 font-size: 14px;
556 font-weight: bold;
557 color: white;
558 border-radius: 3px;
559 margin-right: 10px;
560 background: #52C035;
561 cursor: pointer;
563 .new-btn:hover{
564 text-decoration: none;
565 cursor: pointer;
567 #setting_div_table input[disabled]{
568 cursor: not-allowed;
569 background-color: #eee;
571 #send_test{
572 display:inline-block;
573 border:1px solid #D1D1D1;
574 background-color: #F7F7F7;
575 text-align: center; text-decoration: none;
576 color:#1B83EB;
578 #copyright{
579 display:inline-block;
581 #setting_aria2_headers{
582 overflow:auto;
583 resize:none;
584 width:90%;
585 height:80px;
586 border: 1px solid #C6C6C6;
587 box-shadow: 0 0 3px #C6C6C6;
588 -webkit-box-shadow: 0 0 3px #C6C6C6;
590 #apply{
591 display:inline-block;
592 width:100px;
593 height:40px;
594 text-align: center;
595 text-decoration: none;
596 background: #52C035;
597 background: -webkit-linear-gradient(top, #52C035, #4BAC32);
598 background: -moz-linear-gradient(top, #52C035, #4BAC32);
599 background: -o-linear-gradient(top, #52C035, #4BAC32);
600 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#52C035', endColorstr='#4BAC32');
602 #apply b{
603 float:none;
604 padding-right: 2px;
606 .download-mgr-dialog .content {
607 padding: 10px 20px;
608 height:auto;
609 overflow: hidden;
611 #setting_div_table{
612 width:100%;
613 border:0;
614 border-collapse:separate;
615 border-spacing:10px;
616 display:table;
617 background-color: rgb(250, 250, 250);
620 }.toString().slice(15, -4);
622 if(document.querySelector("iframe[rel='wangpan']")&&top.location==location){
623 if(document.querySelector("iframe[rel='wangpan']").contentDocument.readyState=="complete"){
624 var root=document.querySelector("iframe[rel='wangpan']").contentDocument;
625 var script = document.createElement('script');
626 script.id = "pan_115_script";
627 script.appendChild(document.createTextNode('(' + pan_115 + ')();'));
628 if(document.querySelector("#pan_115_script") == null){
629 (document.body || document.head || document.documentElement).appendChild(script);
630 var style = document.createElement('style');
631 style.setAttribute('type', 'text/css');
632 style.textContent = setting_css;
633 document.head.appendChild(style);