Now scrapes https URLs as well as http. The scraped URL will also end before: * a close parenthesis (for parenthesized URLs) and * an open angle bracket (for a URL followed by markup).
Also uses the more convenient all_word_completer, which fixes http://bugs.conkeror.org/issue245. --- I don't often need this, but I used it today and found another useful case to add (end URL at <). Perhaps a scrape_url_regexp user variable would be good. --- modules/element.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/element.js b/modules/element.js index 4c8042b..db7a82d 100644 --- a/modules/element.js +++ b/modules/element.js @@ -231,9 +231,9 @@ define_browser_object_class("scrape-url", "urls scraped from the source code of the document.", function (I, prompt) { var completions = I.buffer.document.documentElement.innerHTML - .match(/http:[^\s>"]*/g) + .match(/https?:[^\s<>)"]*/g) .filter(remove_duplicates_filter()); - var completer = prefix_completer($completions = completions); + var completer = all_word_completer($completions = completions); var result = yield I.buffer.window.minibuffer.read( $prompt = prompt, $completer = completer, -- 1.7.5.4 _______________________________________________ Conkeror mailing list [email protected] https://www.mozdev.org/mailman/listinfo/conkeror
