This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 百度网盘md5显示 | |
// @namespace undefined | |
// @version 0.3 | |
// @description 在只有一个文件的百度网盘分享页显示文件的md5 | |
// @author myfreeer | |
// @match *://pan.baidu.com/s/* | |
// @match *://yun.baidu.com/s/* | |
// @match *://pan.baidu.com/share/link* | |
// @match *://yun.baidu.com/share/link* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//example url: http://changelog.mokeedev.com/index.php?mk_version=MK60 | |
//usage: query(String str) | |
//result will be shown in console | |
let query = str => Promise.all([...document.querySelectorAll("table > tbody > tr > td > a")].map(e=>fetchretry(e.href).then(res => res.text()).then(text=>text.match(str)&&!console.log(e.href/*,text*/)&&[e.href,text]))).then(e=>e.filter(e => e === 0 || e)); | |
//https://gist.github.com/myfreeer/44f23611451119869804f8c28ee1a190 | |
//rewrite from https://github.com/jonbern/fetch-retry | |
let fetchretry = (url, options) => { | |
var retries = (options && options.retries) ? options.retries : 3; | |
var retryDelay = (options && options.retryDelay) ? options.retryDelay : 500; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name coolapk Real Rank | |
// @namespace myfreeer | |
// @version 0.5 | |
// @description coolapk.com显示真实评分 | |
// @author myfreeer | |
// @license GNU GPL v3 | |
// @downloadURL https://gist.github.com/myfreeer/fdb5fabd7c2e02f72646eb1edc5bad76/raw/coolapk-real-rank-babel.user.js | |
// @match http://*.coolapk.com/apk/* | |
// @match http://*.coolapk.com/game/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:void((function(){if(/\#tabA|-orderway-|orderby=/.test(location.href))return;var bydate = document.querySelectorAll('#filter_dateline_menu > .pop_moremenu a[href*="orderby=dateline"], #filter_threadsort_menu > .pop_moremenu a[href*="orderby=dateline"], #filter_orderby_menu a[href*="orderby=dateline"], .colplural .author a[href*="orderby=dateline"], a[href$="orderby=dateline"]') || document.querySelectorAll('.content_filter a[href*="orderby=postdate"], .thread_sort a[href*="orderway"][href*="postdate"], #threadlist .mr20 a[href][onclick^="orderThreads(\'postdate\')"]'); for(var i in bydate) if (bydate[i].href&&bydate[i].href.match(location.href.match(/(fid=|forum-)([0-9]+)/)[2]))location.href=bydate[i].href;})()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var parseXmlSafe = function parseXmlSafe(text) { | |
"use strict"; | |
text = text.replace(/(?:[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g, ""); | |
if (window.DOMParser) return new window.DOMParser().parseFromString(text, "text/xml");else if (ActiveXObject) { | |
var activeXObject = new ActiveXObject("Microsoft.XMLDOM"); | |
activeXObject.async = false; | |
activeXObject.loadXML(text); | |
return activeXObject; | |
} else throw new Error("parseXmlSafe: XML Parser Not Found."); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//rewrite from https://github.com/jonbern/fetch-retry | |
let fetchretry = (url, options) => { | |
var retries = (options && options.retries) ? options.retries : 3; | |
var retryDelay = (options && options.retryDelay) ? options.retryDelay : 500; | |
return new Promise((resolve, reject) => { | |
let wrappedFetch = n => fetch(url, options).then(response => resolve(response)).catch(error => n > 0 ? setTimeout(() => wrappedFetch(--n), retryDelay) : reject(error)); | |
wrappedFetch(retries); | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var resolvePromiseArrayWait = function resolvePromiseArrayWait(array, myPromise) { | |
'use strict'; | |
var timeout = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; | |
var retries = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; | |
return new Promise(function (resolve, reject) { | |
var resultArray = []; | |
var resolver = function resolver(index) { | |
return setTimeout(function () { | |
return myResolver(index); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class URLSearchParams { | |
constructor(str) { | |
if (str) this._parse(str); | |
} | |
_getStr(key) { | |
return Array.isArray(this[key]) ? this[key].map(value => `${key}=${encodeURIComponent(value)}`).join('&') : `${key}=${encodeURIComponent(this[key])}`; | |
} | |
_parse(str) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name coolapk clear link | |
// @namespace coolapk.com | |
// @version 0.7 | |
// @description convert coolapk's short link to real link | |
// @description:zh-CN 将coolapk.com的短链接转换为真实链接 | |
// @license MIT | |
// @include http://coolapk.com/* | |
// @include https://coolapk.com/* | |
// @include http://*.coolapk.com/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name hls.user.js | |
// @name:zh-CN hls.user.js | |
// @namespace hls.js | |
// @version 0.2.4 | |
// @description m3u8 playback using HTML5 video and MediaSource Extensions (CORS Required!) | |
// @description:zh-cn 基于HTML5和MediaSource Extensions的hls/m3u8播放 | |
// @include https://* | |
// @include http://* | |
// @exclude http://218.94.1.182:8080/* |