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/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 diff --git a/make.js b/make.js index 50a4295d1..23e81e8d6 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); @@ -353,7 +353,7 @@ target.extension = function() { target.locale(); target.firefox(); - target.chrome(); + target.chromium(); }; target.buildnumber = function() { @@ -635,13 +635,13 @@ 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 + '/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');