Skip to content

Instantly share code, notes, and snippets.

@clvrobj
Created October 28, 2011 08:05
Show Gist options
  • Save clvrobj/1321841 to your computer and use it in GitHub Desktop.
Save clvrobj/1321841 to your computer and use it in GitHub Desktop.
douban.com dotjs plugin
// 2012 new version
// 点击logo到广播
$('.site-nav-logo a').attr('href', 'http://www.douban.com/update/');
// 按"."刷新广播,与twitter快捷键一致
$('body').keypress(
function (e) {
var code = e.charCode ? e.charCode : e.keyCode;
if (code === 46 && !$(':focus').is(':input')) {
// '.' to reload
location.reload();
}
});
@clvrobj
Copy link
Author

clvrobj commented Oct 28, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment