- needed for faster Node.js builds
brew install ninja| 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)); |
| #!/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 |
| <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 () { |
| #! /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 |
| (({}+[])[!![]+!![]+!![]]+[]+(![]+[])[+!![]]+(+(!![]+!![]+!![]+[]+(+!![])))[(!![]+[])[+![]]+[]+({}+[])[+!![]]+[][(![]+[])[!![]+!![]+!![]]+[]+(![]+[])[!![]+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[!![]+!![]+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+(![]+[])[+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]](+[![]]+[]+(!![]+[])[({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]])[(![]+[])[+![]]+[]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]]([][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[ |
| 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) { |
| 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]); | |
| }, |
| // 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!'); |
| @echo off | |
| SETLOCAL | |
| SET MOZBUILDDIR=%~dp0 | |
| SET MOZILLABUILD=%MOZBUILDDIR% | |
| echo "Mozilla tools directory: %MOZBUILDDIR%" | |
| REM Git path | |
| set GIT_ROOT=C:\Program Files\Git |