Skip to content

Commit f9a7976

Browse files
committed
Version up and history;
clipboardWrite permission for jsPatch-es to copy page info on end-page;
1 parent ac7df34 commit f9a7976

3 files changed

Lines changed: 41 additions & 16 deletions

File tree

includes/autopatchwork.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@
12321232
}
12331233

12341234
/**
1235-
* Returns link node reference.
1235+
* Returns link node's reference URL.
12361236
* @param {Element} node The input node.
12371237
* */
12381238
function get_href(node) {
@@ -1251,7 +1251,7 @@
12511251

12521252
/**
12531253
* Evaluates expression to find node containing next page link.
1254-
* @param {Element} doc Node to perform search on.
1254+
* @param {Element|HTMLDocument} doc Node to perform search on.
12551255
* @return {Element} Matched node.
12561256
* */
12571257
function get_next_link(doc) {
@@ -1270,7 +1270,7 @@
12701270

12711271
/**
12721272
* Evaluates expression to find nodes containing main page content.
1273-
* @param {Element} doc Node to perform search on.
1273+
* @param {Element|HTMLDocument} doc Node to perform search on.
12741274
* @return {NodeList} Matched nodes.
12751275
* */
12761276
function get_main_content(doc) {
@@ -1421,8 +1421,8 @@
14211421
return url;
14221422
}
14231423

1424-
// - Replace lazyloading src's to normal. Although better solution would be using per-site js patches.
1425-
// - Make links to images absolute.
1424+
// - Replaces lazyloading src's to normal. Although better solution would be using per-site js patches.
1425+
// - Makes URLs to images absolute.
14261426
function parse_images(node) {
14271427
if (!node || typeof node.nodeType !== 'number' || node.nodeType !== 1) return; // 1 -> Node.ELEMENT_NODE
14281428
for (var i = 0, img = (node.tagName && node.tagName.toLowerCase() === 'img')?[node]:node.getElementsByTagName('img'), len = img.length; i < len; i++) {
@@ -1445,8 +1445,8 @@
14451445
}
14461446
}
14471447

1448-
// - Make target attribute as specified.
1449-
// - Fix relative link URL to absolute.
1448+
// - Makes target attribute as specified.
1449+
// - Fixes relative link URLs to absolute.
14501450
function parse_links(node, target) {
14511451
// we are ignoring links inside links, i.e a>a
14521452
if (!node || typeof node.nodeType !== 'number' || node.nodeType !== 1) return; // 1 -> Node.ELEMENT_NODE

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"page": "options.html"
2121
},
2222
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
23-
"permissions": ["unlimited_storage", "tabs", "notifications", "http://os0x.heteml.jp/*","http://wedata.net/*","https://githubusercontent.com/*"],
23+
"permissions": ["unlimited_storage", "tabs", "notifications", "clipboardWrite", "http://os0x.heteml.jp/*","http://wedata.net/*","https://githubusercontent.com/*"],
2424
"optional_permissions": ["storage"],
2525
"content_scripts": [{
2626
"js": ["includes/autopatchwork.js"],

options.html

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ <h4>Version 1.9.7</h4>
170170
Links target rewriting option.
171171
</li>
172172
<li>
173-
Site filters by regexps, prefixes and domains.
173+
Site filters by RegExps, prefixes and domains.
174174
</li>
175175
<li>
176176
SITEINFO updater and editor.
@@ -207,12 +207,12 @@ <h4>Version 1.9.8</h4>
207207
</li>
208208
<li>
209209
Following local SITEINFO fields were added:
210-
<ul><li><i>nextMask</i> - allows nuber auto-increments in next page address.</li>
210+
<ul><li><i>nextMask</i> - allows number auto-increments in next page address.</li>
211211
<li><i>pageElementSelector</i> - allows next link search by selector.</li>
212212
<li><i>nextLinkSelector</i> - allows content search by selector.</li>
213213
<li><i>forceIframe</i> - pages loaded through temporary IFrame instead of XHR.</li>
214214
<li><i>disableSeparator</i> - disables page separator between added pages.</li>
215-
<li><i>forceAddressChange</i> - dinamically updates location URL.</li>
215+
<li><i>forceAddressChange</i> - dynamically updates location URL.</li>
216216
<li><i>allowScripts</i> - allows scripts inside content block of new pages.</i>
217217
</ul>
218218
</li>
@@ -269,12 +269,37 @@ <h4>Version 1.9.9</h4>
269269
SITEINFO database can be reloaded manually.
270270
</li>
271271
<li>
272-
SITEINFO database can be cleaned from all unused entries that have no successful hits until next update.
272+
SITEINFO database can be automatically cleaned from all unused (that have no successful hits) entries on update.
273273
</li>
274+
</ul>
275+
<h4>Version 1.10.0</h4>
276+
<ul>
274277
<li>
275-
Various bugfixes.
278+
Reworked menu to be compact image list with translatable tooltips.
276279
</li>
277-
</ul>
280+
<li>
281+
With <kbd>Shift</kbd> <i>Toggle</i> button disables the extension on current site until browser restart.
282+
</li>
283+
<li>
284+
Button for refreshing incomplete (with <kbd>Shift</kbd> - all) images on a page without reloading it.
285+
</li>
286+
<li>
287+
Button for retrying last failed request attempt before termination.
288+
</li>
289+
<li>
290+
Following local SITEINFO fields were added:
291+
<ul>
292+
<li><i>prevLink, prevLinkSelector</i> - specifies previous link for switching autopaging direction.</li>
293+
</ul>
294+
</li>
295+
<li>
296+
<i>AutoPatchWork.request</i> event accepts only URL strings as <i>link</i> property.
297+
</li>
298+
<li>
299+
<i>AutoPatchWork.DOMNodeInserted</i> event is disabled on the source-code level. Significantly improves performance.
300+
</li>
301+
</ul>
302+
<br />* <i>All version updates include various minor bug-fixes between them.</i>
278303
<br />
279304
</section>
280305
<section id='about' class='content' style='visibility: hidden; height: 100px'>
@@ -289,13 +314,13 @@ <h4>Version 1.9.9</h4>
289314
Author:
290315
</dt>
291316
<dd>
292-
<a href='https://github.com/Dither' target='_blank'>Dither</a>
317+
<a href='https://github.com/Dither' target='_blank'>DitherSky</a>
293318
</dd>
294319
<dt class='MSG_thank_you'>
295320
Thanks:
296321
</dt>
297322
<dd>
298-
<a href='http://ss-o.net/' target='_blank'>os0x</a> (Original AutoPatchWork version author.)
323+
<a href='http://os0x.heteml.jp/' target='_blank'>os0x</a> (Original AutoPatchWork version author.)
299324
</dd>
300325
<dd>
301326
<a href='http://autopagerize.net/' target='_blank'>AutoPagerize</a>

0 commit comments

Comments
 (0)