infocatcher / handy_clicks Goto Github PK
View Code? Open in Web Editor NEWProvides more clicks options, extension for Firefox and SeaMonkey
License: Other
Provides more clicks options, extension for Firefox and SeaMonkey
License: Other
Warning: TypeError: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create Source file: chrome://handyclicks/content/regSvc.js Line: 121
We should rewrite our shortcuts mechanism. :(
This is very good addition for import statistics:
Added: … – highlighted in tree
Changed: … – highlighted in tree
Removed: … – currently not visible
Can be compared only after import (with previously saved copy).
Settings – Built-in functions – Convert URIs to following charset
Also we should have some way to drop cached code from redirected file, see #29.
E.g. something like %Firefox_profile%/handyclicks/scripts/example.js instead of many copies of the same code.
We should at least try to use OS.File.read():
See https://developer.mozilla.org/en-US/docs/JavaScript_OS.File/OS.File_for_the_main_thread#Example.3A_Read_the_contents_of_a_file_as_text
(because we read settings file on opening of each browser window)
Columns will be strange... but it's good to see, what will be imported, ability to search & Co.
Also see #13 – we use handyClicksCleanupSvc.registerNodeCleanup() only here.
And this is probably needed only for things like already obsolete Fox Splitter (formerly Split Browser) extension (with multiple <tabbrowser>s).
Also we can use global event handlers
window.addEventListener("TabClose", ..., true);
window.addEventListener("TabSelect", ..., true);
and detect target <tabbrowser> from event data.
Oh, this is the hardest part... :)
Since Firefox 30 we have messages like
Error: [Handy Clicks] foo is not defined
Source file: chrome://handyclicks/content/prefSvc.js line 455 > Function
Line: 4
with already correct line numbers.
We shouldn't override background color in this case.
See chrome://global/skin/tree.css
http://mxr.mozilla.org/mozilla-central/source/toolkit/themes/windows/global/tree-aero.css
@media (-moz-windows-default-theme) {
...
}
So, we can set some attribute, based on
skin global classic/1.0 toolkit/skin/classic/aero/global/ os=WINNT osversion>=6
and something like
document.querySelector(":-moz-system-metric(windows-default-theme)");
We don't use them at startup, so this is good performance enhancement.
See Infocatcher/Custom_Buttons#28
We should update our handyClicks.isMenu()
function.
This is bad practice to create sync-like mirror for addons and it's also bad to call AddonManager.getAllAddons() on startup even after delay.
And we can use synchronous nsIXULChromeRegistry.getSelectedLocale()
for most extensions (which have content
instruction in chrome.manifest).
See https://bugzilla.mozilla.org/show_bug.cgi?id=912260
We can't use
Scratchpad.editor.setSelection(ifi.selectionStart, ifi.selectionEnd);
anymore.
We have too many utils...
All utils, that used during startup, should be moved to globals.js (or to another separate file).
Also all should be fine with backward compatibility:
var handyClicksUtils = {
__proto__: { // handyClicksGlobals
timeout: function(...) { ... }
},
...
};
"timeout" in handyClicksUtils; // true
We (probably) can use event.getModifierState("OS")
.
We have too many code for export/import & Co.
Private windows in SeaMonkey doesn't have windowtype
, so we don't update them after changes in settings.
Also see 557a68f commit.
For #29.
Default value was changed to true
in Firefox 32.0a1 on Windows... And our preferences window is a bit complicated, so ability to disable instantApply behavior may be useful.
We shouldn't add event listeners and touch settings file.
In addition to #9.
In browser window we use handyClicksWinUtils
only on window closing.
We use Application.storage.has()
/get()
/set()
.
Also we have fallback implementation using nsIAppShellService.hiddenDOMWindow
, but this should be tested anyway...
See https://bugzilla.mozilla.org/show_bug.cgi?id=1090880
Dear Infocatcher & community,
would it be possible to port this extension to Waterfox 68? Waterfox 68 still supports legacy (bootstrapped and overlay) add-ons.
It can be downloaded from here:
Relevant documentation:
@Infocatcher, did you see my related question regarding Private Tab?
Would be glad to know whether or not this extension can be run in Waterfox 68. Thank you for your attention.
Peacock365
In addition for #35: ut.isObject(), ut.getOwnProperty() & Co, that will be loaded from
ps.loadSettingsAsync() -> ps.initCustomFuncs()
We currently uses 16x16 Fugue icons:
https://www.iconfinder.com/icons/46136/mouse_icon#size=16
https://www.iconfinder.com/icons/46135/mouse_select_icon#size=16
https://www.iconfinder.com/icons/46134/mouse_select_wheel_icon#size=16
https://www.iconfinder.com/icons/46133/mouse_right_select_icon#size=16
And they looks not so good in resized state (even if resized 32x32 source).
So, it's better to use Farm-fresh icons:
https://www.iconfinder.com/icons/64478/mouse_icon#size=32
https://www.iconfinder.com/icons/64479/left_mouse_select_icon#size=32
https://www.iconfinder.com/icons/64481/mouse_scroll_select_icon#size=32
https://www.iconfinder.com/icons/64480/mouse_right_select_icon#size=32
Also we need 32x32 icons for upcoming Australis with large icons in menu-button and in customize mode.
Yet another improvement for startup performance:
ui.init()
-> ui.setStatus()
~~> delay -> (load handyclicks.js) hc.preloadSettings()
~~> delay -> (load prefSvc.js, improved in #33) ps.loadSettingsAsync()
-> (load utils.js, will load less code here) ut.readFromFileAsync()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.