Last active
August 29, 2015 14:03
-
-
Save giiska/ab04ecca2569ddf6c2fd to your computer and use it in GitHub Desktop.
UserScript
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 socialbase content list replace url | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.1.1 | |
// @description enter something useful | |
// @match http://socialbase.hk/socialbase/content/* | |
// @copyright 2014+, bammoo | |
// ==/UserScript== | |
require(['jquery'], function($) { | |
setTimeout(function() { | |
console.log('socialbase content list replace preview url'); | |
$('a[href^="http://api.socialbase.cn/extapi/"]').each(function(idx, item) { | |
var href = $(item).attr('href').replace('api.socialbase.cn', 'socialbase.hk'); | |
$(item).attr('href', href); | |
}) | |
}, 5000) | |
}) |
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 socialbase weimenhu | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.1.2 | |
// @description enter something useful | |
// @match http://socialbase.hk/weimenhu/zbbb/* | |
// @copyright 2014+, bammoo | |
// ==/UserScript== | |
require(['jquery'], function($) { | |
var replaceName = 'zbbb' | |
, timeOut = 2000 | |
; | |
setTimeout(function() { | |
console.log('start weimenhu name replace'); | |
$('a[href^="http://' + replaceName + '.socialbase.hk/weimenhu/"]').each(function(idx, item) { | |
var href = $(item).attr('href').replace(replaceName + '.', ''); | |
$(item).attr('href', href); | |
}) | |
}, timeOut) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment