If following a link during a hints interaction would also execute a script, the URL panel now includes the text "[script]" to warn the user.
-- Previously: http://thread.gmane.org/gmane.comp.mozilla.conkeror/2483/focus=2484 Notes: - The URL panel and overlink mode serve a similar notification purpose; we should provide a common interface for setting their text. - If we start putting other stuff in the URL panel, perhaps it needs a more general name; e.g. hints_information. --- modules/hints.js | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/hints.js b/modules/hints.js index 34d478d..a2ea901 100644 --- a/modules/hints.js +++ b/modules/hints.js @@ -420,17 +420,24 @@ function hints_url_panel (hints, window) { window.minibuffer.element.insertBefore(p, null); p.update = function () { - p.value = ""; + var s = []; if (hints.manager && hints.manager.last_selected_hint) { var spec; + var elem = hints.manager.last_selected_hint.elem; + + if (elem.hasAttribute("onmousedown") || + elem.hasAttribute("onclick")) + s.push("[script]"); + try { - spec = load_spec(hints.manager.last_selected_hint.elem); + spec = load_spec(elem); } catch (e) {} if (spec) { var uri = load_spec_uri_string(spec); - if (uri) p.value = uri; + if (uri) s.push(uri); } } + p.value = s.join(" "); }; p.destroy = function () { -- 1.7.5.4 _______________________________________________ Conkeror mailing list [email protected] https://www.mozdev.org/mailman/listinfo/conkeror
