Skip to content

Instantly share code, notes, and snippets.

@ccloli
Last active August 29, 2015 14:26
Show Gist options
  • Save ccloli/5e01ce3544d7c6436571 to your computer and use it in GitHub Desktop.
Save ccloli/5e01ce3544d7c6436571 to your computer and use it in GitHub Desktop.
Chrorme Ba Banner
// ==UserScript==
// @name Chrorme Ba Banner
// @version 1.1
// @description chrome://kill
// @author 864907600cc
// @icon https://secure.gravatar.com/avatar/147834caf9ccb0a66b2505c753747867
// @match http://tieba.baidu.com/chrome
// @match http://tieba.baidu.com/chrome?*
// @match http://tieba.baidu.com/f*w=chrome
// @match http://tieba.baidu.com/f*w=chrome&*
// @match http://tieba.baidu.com/f*z=*
// @match http://tieba.baidu.com/p/*
// @include http://tieba.baidu.com/chrome
// @include http://tieba.baidu.com/chrome?*
// @include http://tieba.baidu.com/f*w=chrome
// @include http://tieba.baidu.com/f*w=chrome&*
// @include http://tieba.baidu.com/f*z=*
// @include http://tieba.baidu.com/p/*
// @run-at document-start
// @grant none
// @namespace http://ext.ccloli.com
// ==/UserScript==
var timer = function(){
if (window.PageData && PageData.product == 'frs' && document.querySelector('.card_banner img') && document.querySelector('.card_head_img')) {
document.querySelector('.card_banner img').setAttribute('src', 'http://imgsrc.baidu.com/forum/pic/item/a0a28f3df8dcd10093c4272d748b4710b8122fc3.jpg');
document.querySelector('.card_head_img').setAttribute('src', 'http://imgsrc.baidu.com/forum/pic/item/a14c3df5e0fe99256696535d32a85edf8cb1718e.jpg');
}
else if (window.PageData && PageData.product == 'pb' && PageData.forum && PageData.forum.forum_name == 'chrome' && document.querySelector('.card_head_img')) {
document.querySelector('.card_head_img').setAttribute('src', 'http://imgsrc.baidu.com/forum/pic/item/a0a28f3df8dcd1008516192c748b4710b8122f9e.jpg');
}
else setTimeout(timer, 100);
}
setTimeout(timer, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment