Skip to content

Instantly share code, notes, and snippets.

@sentience
sentience / _.remove.js
Last active April 21, 2020 20:47 — forked from lstebner/_.remove.js
Underscore.js mixing to remove one or more keys from an object
// remove key from object
_.mixin({
remove: function(obj, keys){
return _.chain([keys]).flatten().reduce(function(obj, key){
delete obj[key];
return obj;
}, obj).value();
}
});
// ==UserScript==
// @name drag & drop fotolife uploader
// @namespace http://rails2u.com/*
// @description フォトライフでローカルファイルから drag & drop でファイルアップロード (HTML5 File API 対応ブラウザのみ)
// @include http://f.hatena.ne.jp/*/up*
// ==/UserScript==
var upForm = document.getElementById('upload');