Skip to content

Commit

Permalink
Version up and history;
Browse files Browse the repository at this point in the history
clipboardWrite permission for jsPatch-es to copy page info on end-page;
  • Loading branch information
Dither committed Dec 6, 2016
1 parent ac7df34 commit f9a7976
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 16 deletions.
14 changes: 7 additions & 7 deletions includes/autopatchwork.js
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@
}

/**
* Returns link node reference.
* Returns link node's reference URL.
* @param {Element} node The input node.
* */
function get_href(node) {
Expand All @@ -1251,7 +1251,7 @@

/**
* Evaluates expression to find node containing next page link.
* @param {Element} doc Node to perform search on.
* @param {Element|HTMLDocument} doc Node to perform search on.
* @return {Element} Matched node.
* */
function get_next_link(doc) {
Expand All @@ -1270,7 +1270,7 @@

/**
* Evaluates expression to find nodes containing main page content.
* @param {Element} doc Node to perform search on.
* @param {Element|HTMLDocument} doc Node to perform search on.
* @return {NodeList} Matched nodes.
* */
function get_main_content(doc) {
Expand Down Expand Up @@ -1421,8 +1421,8 @@
return url;
}

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

// - Make target attribute as specified.
// - Fix relative link URL to absolute.
// - Makes target attribute as specified.
// - Fixes relative link URLs to absolute.
function parse_links(node, target) {
// we are ignoring links inside links, i.e a>a
if (!node || typeof node.nodeType !== 'number' || node.nodeType !== 1) return; // 1 -> Node.ELEMENT_NODE
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"page": "options.html"
},
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
"permissions": ["unlimited_storage", "tabs", "notifications", "http://os0x.heteml.jp/*","http://wedata.net/*","https://githubusercontent.com/*"],
"permissions": ["unlimited_storage", "tabs", "notifications", "clipboardWrite", "http://os0x.heteml.jp/*","http://wedata.net/*","https://githubusercontent.com/*"],
"optional_permissions": ["storage"],
"content_scripts": [{
"js": ["includes/autopatchwork.js"],
Expand Down
41 changes: 33 additions & 8 deletions options.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ <h4>Version 1.9.7</h4>
Links target rewriting option.
</li>
<li>
Site filters by regexps, prefixes and domains.
Site filters by RegExps, prefixes and domains.
</li>
<li>
SITEINFO updater and editor.
Expand Down Expand Up @@ -207,12 +207,12 @@ <h4>Version 1.9.8</h4>
</li>
<li>
Following local SITEINFO fields were added:
<ul><li><i>nextMask</i> - allows nuber auto-increments in next page address.</li>
<ul><li><i>nextMask</i> - allows number auto-increments in next page address.</li>
<li><i>pageElementSelector</i> - allows next link search by selector.</li>
<li><i>nextLinkSelector</i> - allows content search by selector.</li>
<li><i>forceIframe</i> - pages loaded through temporary IFrame instead of XHR.</li>
<li><i>disableSeparator</i> - disables page separator between added pages.</li>
<li><i>forceAddressChange</i> - dinamically updates location URL.</li>
<li><i>forceAddressChange</i> - dynamically updates location URL.</li>
<li><i>allowScripts</i> - allows scripts inside content block of new pages.</i>
</ul>
</li>
Expand Down Expand Up @@ -269,12 +269,37 @@ <h4>Version 1.9.9</h4>
SITEINFO database can be reloaded manually.
</li>
<li>
SITEINFO database can be cleaned from all unused entries that have no successful hits until next update.
SITEINFO database can be automatically cleaned from all unused (that have no successful hits) entries on update.
</li>
</ul>
<h4>Version 1.10.0</h4>
<ul>
<li>
Various bugfixes.
Reworked menu to be compact image list with translatable tooltips.
</li>
</ul>
<li>
With <kbd>Shift</kbd> <i>Toggle</i> button disables the extension on current site until browser restart.
</li>
<li>
Button for refreshing incomplete (with <kbd>Shift</kbd> - all) images on a page without reloading it.
</li>
<li>
Button for retrying last failed request attempt before termination.
</li>
<li>
Following local SITEINFO fields were added:
<ul>
<li><i>prevLink, prevLinkSelector</i> - specifies previous link for switching autopaging direction.</li>
</ul>
</li>
<li>
<i>AutoPatchWork.request</i> event accepts only URL strings as <i>link</i> property.
</li>
<li>
<i>AutoPatchWork.DOMNodeInserted</i> event is disabled on the source-code level. Significantly improves performance.
</li>
</ul>
<br />* <i>All version updates include various minor bug-fixes between them.</i>
<br />
</section>
<section id='about' class='content' style='visibility: hidden; height: 100px'>
Expand All @@ -289,13 +314,13 @@ <h4>Version 1.9.9</h4>
Author:
</dt>
<dd>
<a href='https://github.com/Dither' target='_blank'>Dither</a>
<a href='https://github.com/Dither' target='_blank'>DitherSky</a>
</dd>
<dt class='MSG_thank_you'>
Thanks:
</dt>
<dd>
<a href='http://ss-o.net/' target='_blank'>os0x</a> (Original AutoPatchWork version author.)
<a href='http://os0x.heteml.jp/' target='_blank'>os0x</a> (Original AutoPatchWork version author.)
</dd>
<dd>
<a href='http://autopagerize.net/' target='_blank'>AutoPagerize</a>
Expand Down

0 comments on commit f9a7976

Please sign in to comment.