Skip to content

Instantly share code, notes, and snippets.

@mescoda
mescoda / bdhold-autoselect.user.js
Last active January 3, 2016 20:29
auto select for hold.baidu.com
// ==UserScript==
// @name bdhold-autoselect
// @namespace bdhold-autoselect
// @version 0.4
// @reason add qiang-btn support
// @author mescoda on http://mescoda.com/
// @description auto select for hold.baidu.com
// @include http://hold.baidu.com
// @include http://hold.baidu.com/*
// @grant GM_xmlhttpRequest
@mescoda
mescoda / zhihu-position.user.js
Created January 29, 2015 09:09
zhihu-position.user.js
// ==UserScript==
// @name zhihu-position
// @namespace zhihu-position
// @version 0.1
// @author Mescoda on http://mescoda.com/
// @description zhihu position
// @include http://www.zhihu.com/*
// @grant GM_xmlhttpRequest
// ==/UserScript==
// ==UserScript==
// @name toggl-helper
// @namespace toggl-helper
// @version 0.3.1
// @author mescoda on http://mescoda.com/
// @include https://toggl.com/app/timer
// @grant unsafeWindow
// ==/UserScript==
document.body.addEventListener('keyup', function (e) {
var r = [];
[].forEach.call(document.getElementsByTagName('blockquote'), function (item) {
var text = item.innerHTML.trim();
if (text.indexOf('magnet') > -1 || text.indexOf('ed2k') > -1) {
r.push(text);
}
});
r.forEach(function (item, index) {
console.log(item);
// ==UserScript==
// @name smzdm-helper
// @namespace smzdm-helper
// @version 0.2
// @author mescoda on http://mescoda.com/
// @include http://*.smzdm.com/*
// @grant unsafeWindow
// ==/UserScript==
var hide = function () {