Skip to content

Commit bef52e4

Browse files
committed
Allow highlighting ocr_page (disabled by default)
1 parent d8f2f95 commit bef52e4

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

dist/hocr.fullscreen.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/hocr.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// ==UserScript==
22
// @name hocr-viewer
33
// @namespace http://github.com/kba/hocrjs
4-
// @updateURL https://unpkg.com/hocrjs@0.3.0/dist/hocr.user.js
5-
// @version 0.3.0
4+
// @updateURL https://unpkg.com/hocrjs@0.3.1/dist/hocr.user.js
5+
// @version 0.3.1
66
// @description Add hocr-viewer controls to a apage
77
// @author kba
88
// @include http://*/*
@@ -23,7 +23,7 @@
2323
'use strict'
2424
function injectHocrViewer() {
2525
const script = document.createElement('script')
26-
script.src = "https://unpkg.com/hocrjs@0.3.0/dist/hocr.fullscreen.js?cachebuster=" + Math.random() * 10000000000000000
26+
script.src = "https://unpkg.com/hocrjs@0.3.1/dist/hocr.fullscreen.js?cachebuster=" + Math.random() * 10000000000000000
2727
script.type = 'text/javascript'
2828
document.querySelector('body').appendChild(script)
2929
}

dist/hocr.viewer.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/_variables.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ $color-toolbar-bg: rgba(180,180,190,0.85);
2121
$color-toolbar-toggler: white;
2222
$color-toolbar-border: #333;
2323

24+
$color-highlight-page: #8B4513;
2425
$color-highlight-not-page: red;
2526
$color-highlight-inline: green;
2627
$color-highlight-carea: blue;

src/components/hocr-viewer/hocr-viewer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export default {
2929
featureTransparentText: {type: Boolean, default: false},
3030
featureTooltip: {type: Boolean, default: false},
3131
featureHighlight: {type: Boolean, default: true},
32+
featureHighlightPage: {type: Boolean, default: false},
3233
featureHighlightNotPage: {type: Boolean, default: false},
3334
featureHighlightInline: {type: Boolean, default: false},
3435
featureHighlightLine: {type: Boolean, default: true},

src/components/hocr-viewer/hocr-viewer.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
&.hocr-viewer-feature-Highlight {
8888
margin: -1px;
8989
&.hocr-viewer-feature-HighlightNotPage {@include highlight-area($selector-ocr-not-page, $color-highlight-not-page)}
90+
&.hocr-viewer-feature-HighlightPage {@include highlight-area($selector-ocr-page, $color-highlight-page)}
9091
&.hocr-viewer-feature-HighlightInline {@include highlight-area($selector-ocr-inline, $color-highlight-inline);}
9192
&.hocr-viewer-feature-HighlightLine {@include highlight-area($selector-ocr-line, $color-highlight-line);}
9293
&.hocr-viewer-feature-HighlightPar {@include highlight-area($selector-ocr-par, $color-highlight-par);}

0 commit comments

Comments
 (0)