Skip to content

Instantly share code, notes, and snippets.

@georgexsh
Last active October 12, 2015 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save georgexsh/4065882 to your computer and use it in GitHub Desktop.
Save georgexsh/4065882 to your computer and use it in GitHub Desktop.
修改豆瓣logo指向为友邻广播
// ==UserScript==
// @name Douban update
// @description haha
// @author georgexsh
// @include http://*.douban.com/*
// @version 0.20
// @encoding utf-8
// ==/UserScript==
(function () {
$().ready(function() {
$("#dale_update_top_right").remove();
$("#dale_homepage_login_top_right").remove();
var miniblog_url = 'http://www.douban.com/update/';
var guess_url = 'http://www.douban.com/';
//$('#db-nav-main .site-nav-logo a').first().attr('href', miniblog_url);
//$('.top-nav-items a').first().attr('href', miniblog_url);
$('.nav-primary .nav-logo a').first().attr('href', miniblog_url);
$('.global-nav-items a').first().attr('href', miniblog_url);
/*
*var nav_items = $('#db-nav-main .site-nav-items a');
*var a0 = $(nav_items[0]);
*var a1 = $(nav_items[1]);
*a0.attr('href', miniblog_url);
*a1.attr('href', guess_url);
*a1.text('豆瓣猜');
*/
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment