Skip to content

Instantly share code, notes, and snippets.

Avatar
😀
Happy

hxgdzyuyi

😀
Happy
View GitHub Profile
@hxgdzyuyi
hxgdzyuyi / backbone-mixin.js
Created Sep 6, 2012 — forked from dmitry/backbone-mixin.js
Merge backbone views (mixin pattern)
View backbone-mixin.js
define('backbone', ['lib-underscore', 'lib-backbone'], function () {
Backbone.mixin = function (view, mixin, custom) {
if (custom) {
if (custom.events && mixin.events) {
mixin = _.clone(mixin)
_.defaults(custom.events, mixin.events)
}
_.extend(mixin, custom)
}
var source = view.prototype || view
@hxgdzyuyi
hxgdzyuyi / gist:2728798
Created May 19, 2012 — forked from xupeng/gist:2728385
自动跳转到广播页
View gist:2728798
// ==UserScript==
// @name Hide someone
// @description Hide someone
// @author Hxgdzyuyi
// @include http://www.douban.com/
// @version 1.4
// @run-at document-start
// ==/UserScript==