From f2ad0f73d712ad52950f9dab6a6862d1dc0d4f03 Mon Sep 17 00:00:00 2001 From: Andreas Bovens Date: Wed, 21 Aug 2013 18:11:35 +0200 Subject: [PATCH 1/3] Renaming of extensions/chrome folder to extensions/chromium, and small tweak to manifest.json description as per #3600 --- extensions/{chrome => chromium}/.gitignore | 0 .../{chrome => chromium}/hide-xhtml-error.css | 0 extensions/{chrome => chromium}/icon128.png | Bin extensions/{chrome => chromium}/icon16.png | Bin extensions/{chrome => chromium}/icon48.png | Bin extensions/{chrome => chromium}/insertviewer.js | 0 extensions/{chrome => chromium}/manifest.json | 2 +- extensions/{chrome => chromium}/patch-worker.js | 0 extensions/{chrome => chromium}/pdfHandler-local.js | 0 extensions/{chrome => chromium}/pdfHandler.html | 0 extensions/{chrome => chromium}/pdfHandler.js | 0 11 files changed, 1 insertion(+), 1 deletion(-) rename extensions/{chrome => chromium}/.gitignore (100%) rename extensions/{chrome => chromium}/hide-xhtml-error.css (100%) rename extensions/{chrome => chromium}/icon128.png (100%) rename extensions/{chrome => chromium}/icon16.png (100%) rename extensions/{chrome => chromium}/icon48.png (100%) rename extensions/{chrome => chromium}/insertviewer.js (100%) rename extensions/{chrome => chromium}/manifest.json (88%) rename extensions/{chrome => chromium}/patch-worker.js (100%) rename extensions/{chrome => chromium}/pdfHandler-local.js (100%) rename extensions/{chrome => chromium}/pdfHandler.html (100%) rename extensions/{chrome => chromium}/pdfHandler.js (100%) diff --git a/extensions/chrome/.gitignore b/extensions/chromium/.gitignore similarity index 100% rename from extensions/chrome/.gitignore rename to extensions/chromium/.gitignore diff --git a/extensions/chrome/hide-xhtml-error.css b/extensions/chromium/hide-xhtml-error.css similarity index 100% rename from extensions/chrome/hide-xhtml-error.css rename to extensions/chromium/hide-xhtml-error.css diff --git a/extensions/chrome/icon128.png b/extensions/chromium/icon128.png similarity index 100% rename from extensions/chrome/icon128.png rename to extensions/chromium/icon128.png diff --git a/extensions/chrome/icon16.png b/extensions/chromium/icon16.png similarity index 100% rename from extensions/chrome/icon16.png rename to extensions/chromium/icon16.png diff --git a/extensions/chrome/icon48.png b/extensions/chromium/icon48.png similarity index 100% rename from extensions/chrome/icon48.png rename to extensions/chromium/icon48.png diff --git a/extensions/chrome/insertviewer.js b/extensions/chromium/insertviewer.js similarity index 100% rename from extensions/chrome/insertviewer.js rename to extensions/chromium/insertviewer.js diff --git a/extensions/chrome/manifest.json b/extensions/chromium/manifest.json similarity index 88% rename from extensions/chrome/manifest.json rename to extensions/chromium/manifest.json index e36274708..83acfc501 100644 --- a/extensions/chrome/manifest.json +++ b/extensions/chromium/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "PDF Viewer", "version": "PDFJSSCRIPT_VERSION", - "description": "Uses HTML5 to display PDF files directly in Chrome.", + "description": "Uses HTML5 to display PDF files directly in the browser.", "icons": { "128": "icon128.png", "48": "icon48.png", diff --git a/extensions/chrome/patch-worker.js b/extensions/chromium/patch-worker.js similarity index 100% rename from extensions/chrome/patch-worker.js rename to extensions/chromium/patch-worker.js diff --git a/extensions/chrome/pdfHandler-local.js b/extensions/chromium/pdfHandler-local.js similarity index 100% rename from extensions/chrome/pdfHandler-local.js rename to extensions/chromium/pdfHandler-local.js diff --git a/extensions/chrome/pdfHandler.html b/extensions/chromium/pdfHandler.html similarity index 100% rename from extensions/chrome/pdfHandler.html rename to extensions/chromium/pdfHandler.html diff --git a/extensions/chrome/pdfHandler.js b/extensions/chromium/pdfHandler.js similarity index 100% rename from extensions/chrome/pdfHandler.js rename to extensions/chromium/pdfHandler.js From 4a4f570aed0388acaa07930e8e7f298a1e2911a0 Mon Sep 17 00:00:00 2001 From: Andreas Bovens Date: Wed, 21 Aug 2013 18:54:59 +0200 Subject: [PATCH 2/3] adjusted paths in make.js to reflect chromium instead of chrome --- make.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/make.js b/make.js index 50a4295d1..f5a5adf62 100644 --- a/make.js +++ b/make.js @@ -32,7 +32,7 @@ var ROOT_DIR = __dirname + '/', // absolute path to project's root BUILD_WORKER_TARGET = BUILD_DIR + 'pdf.worker.js', BUILD_TARGETS = [BUILD_TARGET, BUILD_WORKER_TARGET], FIREFOX_BUILD_DIR = BUILD_DIR + '/firefox/', - CHROME_BUILD_DIR = BUILD_DIR + '/chrome/', + CHROME_BUILD_DIR = BUILD_DIR + '/chromium/', EXTENSION_SRC_DIR = 'extensions/', LOCALE_SRC_DIR = 'l10n/', GH_PAGES_DIR = BUILD_DIR + 'gh-pages/', @@ -144,7 +144,7 @@ target.web = function() { cp(FIREFOX_BUILD_DIR + '/*.xpi', FIREFOX_BUILD_DIR + '/*.rdf', GH_PAGES_DIR + EXTENSION_SRC_DIR + 'firefox/'); cp(CHROME_BUILD_DIR + '/*.crx', FIREFOX_BUILD_DIR + '/*.rdf', - GH_PAGES_DIR + EXTENSION_SRC_DIR + 'chrome/'); + GH_PAGES_DIR + EXTENSION_SRC_DIR + 'chromium/'); cp('web/index.html.template', GH_PAGES_DIR + '/index.html'); cp('-R', 'test/features', GH_PAGES_DIR); @@ -641,7 +641,7 @@ target.chrome = function() { echo('### Building Chrome extension'); var defines = builder.merge(DEFINES, {CHROME: true}); - var CHROME_BUILD_DIR = BUILD_DIR + '/chrome/', + var CHROME_BUILD_DIR = BUILD_DIR + '/chromium/', CHROME_BUILD_CONTENT_DIR = CHROME_BUILD_DIR + '/content/'; target.bundle({ defines: defines }); @@ -657,11 +657,11 @@ target.chrome = function() { defines: defines, copy: [ [COMMON_WEB_FILES, CHROME_BUILD_CONTENT_DIR + '/web'], - [['extensions/chrome/*.json', - 'extensions/chrome/*.html', - 'extensions/chrome/*.js', - 'extensions/chrome/*.css', - 'extensions/chrome/icon*.png',], + [['extensions/chromium/*.json', + 'extensions/chromium/*.html', + 'extensions/chromium/*.js', + 'extensions/chromium/*.css', + 'extensions/chromium/icon*.png',], CHROME_BUILD_DIR], ['external/webL10n/l10n.js', CHROME_BUILD_CONTENT_DIR + '/web'], ['web/viewer.css', CHROME_BUILD_CONTENT_DIR + '/web'], @@ -1073,7 +1073,7 @@ target.lint = function() { 'test/reporter.js', 'test/unit/', 'extensions/firefox/', - 'extensions/chrome/' + 'extensions/chromium/' ]; var jshintPath = path.normalize('./node_modules/.bin/jshint'); From 8dc41e7483e64b135ca18cb5673e75895467b86c Mon Sep 17 00:00:00 2001 From: Andreas Bovens Date: Wed, 21 Aug 2013 19:22:43 +0200 Subject: [PATCH 3/3] adjusted some more chrome references in make.js and README.js as per @yurydelendik's suggestion --- README.md | 6 +++--- make.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 490bafc83..a14936c96 100644 --- a/README.md +++ b/README.md @@ -42,11 +42,11 @@ The Chromium extension is still somewhat experimental but it can be installed tw ways: + [Unofficial Version](https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm) - *This extension is maintained by a PDF.js contributor.* -+ Build Your Own - Get the code as explained below and issue `node make extension`. Then open ++ Build Your Own - Get the code as explained below and issue `node make chromium`. Then open Chrome, go to `Tools > Extension` and load the (unpackaged) extension from the -directory `build/chrome`. +directory `build/chromium`. -The version of the extension for the Opera browser can be found at the [Opera add-ons](https://addons.opera.com/en/extensions/details/pdf-viewer/). +The version of the extension for the Opera browser can be found at the [Opera add-ons catalog](https://addons.opera.com/en/extensions/details/pdf-viewer/). ## Getting the Code diff --git a/make.js b/make.js index f5a5adf62..23e81e8d6 100644 --- a/make.js +++ b/make.js @@ -353,7 +353,7 @@ target.extension = function() { target.locale(); target.firefox(); - target.chrome(); + target.chromium(); }; target.buildnumber = function() { @@ -635,10 +635,10 @@ target.b2g = function() { // // make chrome // -target.chrome = function() { +target.chromium = function() { cd(ROOT_DIR); echo(); - echo('### Building Chrome extension'); + echo('### Building Chromium extension'); var defines = builder.merge(DEFINES, {CHROME: true}); var CHROME_BUILD_DIR = BUILD_DIR + '/chromium/',