dotjs

How can I use GreaseMonkey to give the browser back the “/” key?

ぃ、小莉子 提交于 2019-12-10 13:12:20
问题 Lots of web pages seem to use the / key for searching. I'd like to disable that because 100% of the time I want to use / to search in the page in FireFox. Is there a way I can override this behavior with GreaseMonkey or dotjs? The best public example of this is https://www.github.com/, also https://wiki.jenkins-ci.org/display/JENKINS/Issue+Tracking 回答1: If you set addEventListener()Doc on window and use "event capture", you will catch 99% of what the page tries to do. (Not counting plugins

DOM penalty of using html attributes

懵懂的女人 提交于 2019-12-10 02:23:41
问题 I’m thinking of using HTML5 data attributes for easier third-party scripting of my application. So, consider two cases: There are 10'000 HTML elements on page like <div>Sticker</div> . There are other 10'000 HTML elements like <div data-id="{{id}}" data-category="{{category-id}}">Sticker</div> . The second case (presence of attrs) probably affects DOM / rendering performance, doesn’t it? If so, how much? Just to clarify, I don’t plan to use data attributes on my own, just exposing them for

DOM penalty of using html attributes

血红的双手。 提交于 2019-12-05 02:12:47
I’m thinking of using HTML5 data attributes for easier third-party scripting of my application. So, consider two cases: There are 10'000 HTML elements on page like <div>Sticker</div> . There are other 10'000 HTML elements like <div data-id="{{id}}" data-category="{{category-id}}">Sticker</div> . The second case (presence of attrs) probably affects DOM / rendering performance, doesn’t it? If so, how much? Just to clarify, I don’t plan to use data attributes on my own, just exposing them for third-party scripts or browser addons. Consider dotjs or so. With data attributes it’s very easy to