// ==UserScript==
// @name 下载有声电子书
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://audio.xmcdn.com/**
// @grant none
// ==/UserScript==
function forceDownload(url, fileName){
var xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.responseType = "blob";
xhr.onload = function(){
var urlCreator = window.URL || window.webkitURL;
var imageUrl = urlCreator.createObjectURL(this.response);
var tag = document.createElement('a');
tag.href = imageUrl;
tag.download = fileName;
document.body.appendChild(tag);
tag.click();
document.body.removeChild(tag);
}
xhr.send();
}
(function() {
'use strict';
var filename = decodeURI(window.location.search);
filename = filename.substring(6,filename.length);
if(filename[filename.length-1]===':'||filename[filename.length-1]===':'){
filename = filename.substring(0,filename.length-1);
}
forceDownload(window.location.href,filename);
//setTimeout(function(){window.close()},1000);
// Your code here...
})();
// ==UserScript==
// @name 跳转听书
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
//@require http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js
// @match http://www.woaitingshu.com/video/**
// @grant none
// ==/UserScript==
(function() {
'use strict';
var name = $(".ui-title h2").text();
name = name.replace("您正在收听:","");
window.open(encodeURI(datas[0]+"?name="+name), "_self");
})();
// ==UserScript==
// @name 打开所有页面
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
//@require http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js
// @author You
// @match http://www.woaitingshu.com/mp3/**
// @grant none
// ==/UserScript==
(function() {
'use strict';
var start =1;
var end =5;
var index = 0;
$(".play-list li>a").each(function(){
index++;
if(index>=start && index <=end){
var href = $(this).attr("href");
window.open(href);
}
})
// Your code here...
})();
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于