User talk:Joeytwiddle: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
m (Development moved to User talk:Joeytwiddle: This really isn't an article.. it's more of a personal talk page.)
m (Undo revision 6483 by Joeytwiddle (talk))
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Current development ==
=== Further thoughts on Userscripts Toolbar ===


Are there any branches of development currently underway for Greasemonkey?
Greasemonkey gave userscripts all the powers that Bookmarklets were lacking, persistent state, auto-execute and cross-domain XHR, hooray!  But sometimes I feel that GM has an extra layer of hoops to jump through.  Bookmarklets are quick and flexible.  You don't have to specify which sites a Bookmarklet should load on.  You can be browsing on any website and invoke the Bookmarklet you need when you need it.  (The current GM policy is that users must define which URLs a userscript should run on, before loading the page.  Inconvenient!)


Are there any extra features Greasemonkey needs?
I sometimes dream about a merger of the two technologies, and in my head it appears like this:


== Suggestions ==
* On every page I surf, Greasemonkey loads up my "Userscript bar".  Initially this is just a little icon (maybe a star or a monkey face) which sits in the corner of the page.  When I click it or mouseover, the bar unfolds.
* Sitting in my userscript bar are all my favourite userscripts.  They each have an icon.  The ones which won't work on this page are greyed out or hidden.  But basically I can click on the icon of a userscript when I want to use it.
* I would imagine these "scriptlets" would meet some standard which would allow them to:
** Maybe run some things at startup:
*** Maybe the user previously re-arranged this page using this scriptlet, and they want the changes applied on all visits.
*** The scriptlet might show meta-info about a page.  It could start loading this in the background, and update its icon to present the results summary, or the full summary when clicked.
*** The scriptlet can take a look at what is on the page, and can disable itself if it cannot be of use here.
** Have a default action when invoked by user click, or a standardized menu drop-down if the scriptlet has multiple features.
** Provide an Icon.
** Still have the ability to respond to @include and @exclude metas, but these will be used slightly less often.
** Provide an unload hook as described elsewhere.  If we have finished using a scriptlet, or it's simply not doing the right thing, we invoke this to unload the script and undo its changes.


It could be useful to have one extra meta tag:
What would this achieve?


{{Core samp |1=<pre style="border: none; margin: inherit;">// @loadlib    script_name</pre>}}
* I suggested a richer UI.  We can interact with all our Userscripts in a fast way. They can present us information through their icon and tooltip.  We can just occasionally invoke a rare script that is only useful in odd moments.  If it works, we could click [x] Always run on this page or [x] Always run on this site.
 
* I am suggesting these userscripts become more like mini-apps.  Web helper tools, but cheaper than installing a Firefox extensionIf you want, think of it as "My Mashup Toolbar".
The loadlib meta would cause Greasemonkey to load the specified script from the user's gm_scripts/ folder before running the userscript which contained the meta.
* Have you other Linux users noticed how website GUIs running inside the browser window are actually faster than Firefox's own chrome/xul GUI with native Gnome/GTK?!  Crazy but true.
 
This would allow us to define a library script of common functions which we can re-use in any of our userscripts, simply by adding the metaThese library scripts are always loaded from a trusted source, they are local userscripts which do nothing when run alone.

Latest revision as of 02:45, 13 July 2011

Further thoughts on Userscripts Toolbar

Greasemonkey gave userscripts all the powers that Bookmarklets were lacking, persistent state, auto-execute and cross-domain XHR, hooray! But sometimes I feel that GM has an extra layer of hoops to jump through. Bookmarklets are quick and flexible. You don't have to specify which sites a Bookmarklet should load on. You can be browsing on any website and invoke the Bookmarklet you need when you need it. (The current GM policy is that users must define which URLs a userscript should run on, before loading the page. Inconvenient!)

I sometimes dream about a merger of the two technologies, and in my head it appears like this:

  • On every page I surf, Greasemonkey loads up my "Userscript bar". Initially this is just a little icon (maybe a star or a monkey face) which sits in the corner of the page. When I click it or mouseover, the bar unfolds.
  • Sitting in my userscript bar are all my favourite userscripts. They each have an icon. The ones which won't work on this page are greyed out or hidden. But basically I can click on the icon of a userscript when I want to use it.
  • I would imagine these "scriptlets" would meet some standard which would allow them to:
    • Maybe run some things at startup:
      • Maybe the user previously re-arranged this page using this scriptlet, and they want the changes applied on all visits.
      • The scriptlet might show meta-info about a page. It could start loading this in the background, and update its icon to present the results summary, or the full summary when clicked.
      • The scriptlet can take a look at what is on the page, and can disable itself if it cannot be of use here.
    • Have a default action when invoked by user click, or a standardized menu drop-down if the scriptlet has multiple features.
    • Provide an Icon.
    • Still have the ability to respond to @include and @exclude metas, but these will be used slightly less often.
    • Provide an unload hook as described elsewhere. If we have finished using a scriptlet, or it's simply not doing the right thing, we invoke this to unload the script and undo its changes.

What would this achieve?

  • I suggested a richer UI. We can interact with all our Userscripts in a fast way. They can present us information through their icon and tooltip. We can just occasionally invoke a rare script that is only useful in odd moments. If it works, we could click [x] Always run on this page or [x] Always run on this site.
  • I am suggesting these userscripts become more like mini-apps. Web helper tools, but cheaper than installing a Firefox extension. If you want, think of it as "My Mashup Toolbar".
  • Have you other Linux users noticed how website GUIs running inside the browser window are actually faster than Firefox's own chrome/xul GUI with native Gnome/GTK?! Crazy but true.