diff --git a/Makefile b/Makefile index 4cc370944..e13c6bf3e 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ test: shell-test browser-test production: | bundle @echo "Preparing web/viewer-production.html"; \ cd web; \ - sed '/PDFJSSCRIPT_REMOVE/d' viewer.html > viewer-1.tmp; \ + sed '/PDFJSSCRIPT_REMOVE_CORE/d' viewer.html > viewer-1.tmp; \ sed '/PDFJSSCRIPT_INCLUDE_BUILD/ r viewer-snippet.html' viewer-1.tmp > viewer-production.html; \ rm -f *.tmp; \ cd .. @@ -257,7 +257,7 @@ extension: | production # Modify the viewer so it does all the extension only stuff. @cd $(FIREFOX_BUILD_CONTENT)/web; \ sed -i.bak '/PDFJSSCRIPT_INCLUDE_BUNDLE/ r ../build/pdf.js' viewer-snippet-firefox-extension.html; \ - sed -i.bak '/PDFJSSCRIPT_REMOVE/d' viewer.html; \ + sed -i.bak '/PDFJSSCRIPT_REMOVE_CORE/d' viewer.html; \ sed -i.bak '/PDFJSSCRIPT_REMOVE_FIREFOX_EXTENSION/d' viewer.html; \ sed -i.bak '/PDFJSSCRIPT_INCLUDE_FIREFOX_EXTENSION/ r viewer-snippet-firefox-extension.html' viewer.html; \ rm -f *.bak; diff --git a/README.md b/README.md index 80763aa75..33bb30b66 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,8 @@ auto-update extensions on a daily basis (you can change this through the `extensions.update.interval` option in `about:config`). For an experimental Chrome extension, get the code as explained below and issue `make extension`. -Then open Chrome with the flag `--enable-experimental-extension-apis`, go to `Tools > Extension` -and load the (unpackaged) extension from the directory `extensions/chrome`. +Then open Chrome, go to `Tools > Extension` and load the (unpackaged) extension +from the directory `build/chrome`. ### Getting the code diff --git a/extensions/chrome/manifest.json b/extensions/chrome/manifest.json index 629e41b31..9b34437b2 100644 --- a/extensions/chrome/manifest.json +++ b/extensions/chrome/manifest.json @@ -3,7 +3,7 @@ "version": "0.1", "description": "Read PDF Document", "permissions": [ - "experimental", + "webRequest", "webRequestBlocking", "http://*/*.pdf", "file:///*/*.pdf" ], diff --git a/extensions/chrome/pdfHandler.html b/extensions/chrome/pdfHandler.html index c13e24c57..1d213bbba 100644 --- a/extensions/chrome/pdfHandler.html +++ b/extensions/chrome/pdfHandler.html @@ -1,6 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -123,6 +123,7 @@ +
Loading... 0%
diff --git a/web/viewer.js b/web/viewer.js index eaca39e77..46665fd87 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -571,6 +571,10 @@ var PDFView = { } }, + pinSidebar: function pdfViewPinSidebar() { + document.getElementById('sidebar').classList.toggle('pinned'); + }, + getVisiblePages: function pdfViewGetVisiblePages() { var pages = this.pages; var kBottomMargin = 10; @@ -1083,7 +1087,6 @@ var TextLayerBuilder = function textLayerBuilder(textLayerDiv) { textDiv.dataset.canvasWidth = text.canvasWidth * text.geom.hScale; textDiv.style.fontSize = fontHeight + 'px'; - textDiv.style.fontFamily = fontName || 'sans-serif'; textDiv.style.left = text.geom.x + 'px'; textDiv.style.top = (text.geom.y - fontHeight) + 'px'; textDiv.textContent = text.str;