This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name DMMono | |
// @include chrome://browser/content/browser.xul | |
// @version 1.0.0 | |
// @description Enable DMM mono access | |
// ==/UserScript== | |
var responseObserver = { | |
observe: function(subject, topic, data) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 新浪微博mid与url互转实用工具 | |
* 作者: XiNGRZ (http://weibo.com/xingrz) | |
*/ | |
var WeiboUtil = { | |
// 62进制字典 | |
str62keys: [ | |
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", | |
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dataURL = this.canvas.toDataURL(this.getImageType()); // grab the snapshot as base64 | |
var imgData = atob(dataURL.substring(13 + this.getImageType().length)); // convert to binary | |
var filenameTimestamp = (new Date().getTime()); | |
var separator = "----------12345-multipart-boundary-" + filenameTimestamp; | |
// Javascript munges binary data when it undergoes string operations (such as concatenation), so we need | |
// to jump through a bunch of hoops with streams to make sure that doesn't happen | |
// create a string input stream with the form preamble |
NewerOlder