![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Free Nodelet Hack: Toggle Between Two Nodelet Configurationsby jdporter (Chancellor) |
on Dec 11, 2006 at 16:38 UTC ( #589079=note: print w/replies, xml ) | Need Help?? |
There are lots of cool nodelets, and normally I like to have almost all of them turned on. Problem is, that makes each page take noticeably longer to load. So sometimes I wish I could have just a bare-bones set of nodelets active. Fortunately, PerlMonks gives you two nodelet configurations, as you can see by going to your Nodelet Settings: there's your FrontPage nodelets, and your non-FrontPage nodelets. But using Nodelet Settings to toggle quickly between them is just not convenient! So I came up with the following code to go in my Free Nodelet. (Note that if you use this you'll definitely want Free Nodelet to be enabled in both your FrontPage and non-FrontPage nodelet sets.)
Each link makes a submission to Nodelet Settings — to enable and disable Use my frontpage nodelets everywhere, respectively — and then "redirects" back to the node you were viewing when you clicked. Note that only the node ID of the current node is remembered; any other URI arguments are dropped. This technique is based on ideas in subthread Re: Free Nodelet Hack: Add parent & root links to nodes in 'Nodes You Wrote' (or anywhere). tye++
Update (hopefully temporary):
In Section
Perl Monks Discussion
|
|