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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function buildJpeg(data, components, transform, embed) { | |
var chunks = []; | |
// SOI | |
chunks.push([0xFF, 0xD8]); | |
// APP12 |
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
@echo off | |
SETLOCAL | |
SET MOZBUILDDIR=%~dp0 | |
SET MOZILLABUILD=%MOZBUILDDIR% | |
echo "Mozilla tools directory: %MOZBUILDDIR%" | |
REM Git path | |
set GIT_ROOT=C:\Program Files\Git |
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
// Keep the URL the same so the browser sees it as the same. | |
channel.originalURI = aRequest.URI; | |
channel.asyncOpen(proxy, aContext); | |
var securityManager = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager); | |
log('got secruity manager!'); | |
var uri = ioService.newURI('resource://pdf.js/web/viewer.html', null, null); | |
var principal = securityManager.getCodebasePrincipal(uri); | |
log('created principal!'); | |
channel.owner = principal; | |
log('hey we changed the owner!'); |
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 Proxy2dContext = function() { | |
this.actions = []; | |
this.deps = {}; | |
}; | |
Proxy2dContext.prototype = { | |
callFunction: function(method, args) { | |
// convert args to real array | |
args = Array.prototype.slice.call(args); | |
this.actions.push([0, method, args]); | |
}, |
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 path = []; | |
function check(obj) { | |
if (typeof obj === 'object') { | |
for (key in obj) { | |
if (!obj.hasOwnProperty) | |
continue; | |
if (!obj.hasOwnProperty(key)) | |
continue; | |
var nextObj = obj[key]; | |
if (nextObj instanceof Dict || nextObj instanceof XRef) { |
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
#! /usr/bin/env python | |
"""\ | |
%prog [options] <last pull request number> | |
Helper script to generate release notes from github pull request titles. | |
""" | |
import json | |
import urllib2 |
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
<canvas id="screencap" onclick="turn()"></canvas> | |
<script> | |
var angle = 0; | |
function turn() { | |
angle = (angle + 90) % 360; | |
} | |
function readImage() { | |
var img = new Image(); | |
img.onload = function () { |
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
#!/bin/sh | |
set -e | |
if [ "$#" -ne 4 ]; then | |
echo "Usage: $0 1_NAME 2_MESSAGE 3_BASELINE 4_CHERRY-PICK" >&2 | |
echo "Example: $0 annot-ap-beta \"Bug 890259 - Use text widget annotation appearance stream if it is available.\" 4e83123 feafb39" >&2 | |
echo "Run in your mozilla-<branch> directory." >&2 | |
exit 1 | |
fi | |
read -p "Did you 1) pop all hg patches, 2) update mozilla-<version>, 3) make sure pdf.js is clean?[y\n] " -n 1 |
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 next = Promise.resolve(); | |
var content = []; | |
for (var i = 1; i <= PDFView.pdfDocument.numPages; i++) { | |
next = next.then(function (pageNum) { | |
return PDFView.pdfDocument.getPage(pageNum).then(function (page) { | |
return page.getTextContent().then(function (tc) { | |
content.push((tc.items || tc).map(function (x) { return x.str; }).join(' ')); | |
}); | |
}); | |
}.bind(null, i)); |
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
(({}+[])[!![]+!![]+!![]]+[]+(![]+[])[+!![]]+(+(!![]+!![]+!![]+[]+(+!![])))[(!![]+[])[+![]]+[]+({}+[])[+!![]]+[][(![]+[])[!![]+!![]+!![]]+[]+(![]+[])[!![]+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[!![]+!![]+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+(![]+[])[+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]](+[![]]+[]+(!![]+[])[({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]])[(![]+[])[+![]]+[]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]]([][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[ |
OlderNewer