From f9a79765c05908097e5ea3dcfb6511d4024102c3 Mon Sep 17 00:00:00 2001 From: Dither Date: Tue, 6 Dec 2016 10:09:34 +0300 Subject: [PATCH] Version up and history; clipboardWrite permission for jsPatch-es to copy page info on end-page; --- includes/autopatchwork.js | 14 ++++++------- manifest.json | 2 +- options.html | 41 +++++++++++++++++++++++++++++++-------- 3 files changed, 41 insertions(+), 16 deletions(-) diff --git a/includes/autopatchwork.js b/includes/autopatchwork.js index 27ea1f7..a870f52 100644 --- a/includes/autopatchwork.js +++ b/includes/autopatchwork.js @@ -1232,7 +1232,7 @@ } /** - * Returns link node reference. + * Returns link node's reference URL. * @param {Element} node The input node. * */ function get_href(node) { @@ -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) { @@ -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) { @@ -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++) { @@ -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 diff --git a/manifest.json b/manifest.json index 9ac837d..ad40140 100644 --- a/manifest.json +++ b/manifest.json @@ -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"], diff --git a/options.html b/options.html index 982f266..72a9e0d 100644 --- a/options.html +++ b/options.html @@ -170,7 +170,7 @@

Version 1.9.7

Links target rewriting option.
  • - Site filters by regexps, prefixes and domains. + Site filters by RegExps, prefixes and domains.
  • SITEINFO updater and editor. @@ -207,12 +207,12 @@

    Version 1.9.8

  • Following local SITEINFO fields were added: - +

    Version 1.10.0

    + +
  • + With Shift Toggle button disables the extension on current site until browser restart. +
  • +
  • + Button for refreshing incomplete (with Shift - all) images on a page without reloading it. +
  • +
  • + Button for retrying last failed request attempt before termination. +
  • +
  • + Following local SITEINFO fields were added: + +
  • +
  • + AutoPatchWork.request event accepts only URL strings as link property. +
  • +
  • + AutoPatchWork.DOMNodeInserted event is disabled on the source-code level. Significantly improves performance. +
  • + +
    * All version updates include various minor bug-fixes between them.