MozillaZine

[Ext] userChrome.js

Announce and Discuss the Latest Theme and Extension Releases.
old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted May 18th, 2006, 2:29 am

Another curiosity worth giving a try if you're a keyboard junkie: the <a href="data:text/javascript,%2F%2F%20make%20%5BCtrl%5D%2B%5B9%5D%20always%20select%20the%20last%20tab%0Awindow.removeEventListener(%22keypress%22%2C%20ctrlNumberTabSelection%2C%20false)%3B%0Aeval(%22ctrlNumberTabSelection%20%3D%20%22%20%2B%20ctrlNumberTabSelection.toString().replace(%22if%20(index%20%3E%3D%22%2C%20%22if%20(index%20%3D%3D%208)%20index%20%3D%20gBrowser.tabContainer.childNodes.length%20-%201%3B%20else%20%24%26%22))%3B%0Awindow.addEventListener(%22keypress%22%2C%20ctrlNumberTabSelection%2C%20false)%3B%0A">Ctrl+9 selects last tab</a> snippet imitates the behavior of IE7 beta 2 (see also bug 338348).

paulfox
 
Posts: 1510
Joined: May 8th, 2004, 1:38 pm

Post Posted May 18th, 2006, 9:25 am

As DesertFox and Zoolcar9 have already done, it would be great to start a "library" of these scripts a la Stylish. I'm Googling daily in fact - between userChrome & Stylish I can see tremendous possibilities, especially after dumping AIO Gestures in favor of Frank's (DFox's) terrific work. 2k! My AIO Gestures PREFS alone were nearly 4k! Amazing.

Any chance of these being on an "org" site or perhaps start a separate thread here for "listings?" This is just so terrific -- but while I've got a good handle on Stylish/css stuff, I'm as "noob" as they get on this & interested in learning as much as I can quickly. Cheers & thanks to everyone for their helpful, constructive advice on here as well as offered scripts.
PentiumIII/W2K, Toshiba AMD laptop/Vista. FX 3 on both.

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted May 18th, 2006, 4:50 pm

Since this is the userChrome.js thread, why not just post the snippets right here?
(It's not as if there will be a UI and 300+ snippets) :)

I'm also interested in dabbling with userChrome.xul as per the previous examples posted by AnonEmoose here and here
Since userChrome.xul is made available via a userChrome.js snippet, and "xul" files can contain "js" code by using <script>, it would make sense to post snippets for both userChrome.js and userChrome.xul here.
Last edited by dougeeebear on May 18th, 2006, 5:36 pm, edited 1 time in total.

Old Greg S
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted May 18th, 2006, 5:04 pm

Alright zeniko, I played with it but I guess I'm not holding my mouth just right because I can't get it to work. All I'm getting is an error in the console.

Edit: For the third time I've had to re-copy something into userChrome.js before it will work. The initial paste seems to cause some kind of syntax error for whatever reason. Anyway it works, Thanks
Last edited by Old Greg S on May 21st, 2006, 1:38 pm, edited 1 time in total.

mrtech

User avatar
 
Posts: 2007
Joined: May 15th, 2003, 7:46 am
Location: New York

Post Posted May 18th, 2006, 8:36 pm

zeniko wrote:Jim, all you should have to do is to check for the existence of the file userChrome.js when ChromEdit's dialog is opened and then either display or not display the fourth tab:
Code: Select all
var uchrm = Components.classes["@mozilla.org/file/directory_service;1"]
                      .getService(Components.interfaces.nsIProperties)
                      .get("UChrm", Components.interfaces.nsILocalFile);
uchrm.append("userChrome.js");
if (uchrm.exists() && uchrm.isFile()) {
   // display the userChrome.js tab
}

This is sufficient because the extension itself ensures the existence of that file. And should you still have issues, I'll have a look at your version.

Oh, and I've PMed you the mail - just for reference (or in case you want to search your junk folder).


I just released Local Install 5.0.3 which now supports userChrome.js editing in the Chrome Editor window. No individual dropdown menu options yet, maybe in a future release.
mel reyes • mrtech.com • BlogPlaxoLinkedInTwitter
Support mrtech.com get our toolbar

JNewbry

User avatar
 
Posts: 321
Joined: April 9th, 2005, 3:56 am
Location: Dallas,TX

Post Posted May 19th, 2006, 12:53 am

With permission from mrtech to use some script "borrowed" from Local Install 5.0.3... Thanks Again!
And with zeniko's help with the recognition script (see the userChrome.js file if present).......
ChromEdit Plus is now up to speed for use with his userChrome.js extension!

Before I post a link to it, I'll like to get yall's opinion on whether to incorporate the extension into ChromEdit Plus.
Yes, zeniko kindly gave me his permission for that...

Let me know.
<a href="http://webdesigns.ms11.net/chromeditp.html" target="_blank">ChromEdit Plus</a> | <a href="http://webdesigns.ms11.net/winstripethemes.html" target="_blank">Firefox Themes</a>

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted May 19th, 2006, 2:51 pm

Here's a userChrome.XUL snippet that will add a "Manage Folder" item to the bookmarks context menu.
This works in Firefox 1.5.0.*.
I took the code from this extension and adapted it to userChrome.xul.

<a href="data:application/x-javascript;charset=utf-8;base64,PG92ZXJsYXkgaWQ9Im1hbmFnZUJvb2ttYXJrc0ZvbGRlcnMiDQogICB4bWxucz0iaHR0cDovL3d3dy5tb3ppbGxhLm9yZy9rZXltYXN0ZXIvZ2F0ZWtlZXBlci90aGVyZS5pcy5vbmx5Lnh1bCI%2BDQoNCjxzY3JpcHQgdHlwZT0iYXBwbGljYXRpb24veC1qYXZhc2NyaXB0Ij4NCnZhciBvbGRCb29rbWFya3NHZXRDb21tYW5kcyA9IHdpbmRvdy5Cb29rbWFya3NDb21tYW5kLmdldENvbW1hbmRzOw0KDQpCb29rbWFya3NDb21tYW5kLmdldENvbW1hbmRzID0gZnVuY3Rpb24gKG5vZGUsIHBhcmVudCwgZHMpDQp7DQogICAgdmFyIGNtZHMgPSBvbGRCb29rbWFya3NHZXRDb21tYW5kcyhub2RlLCBwYXJlbnQsIGRzKTsNCiAgICB2YXIgdHlwZSA9IEJvb2ttYXJrc1V0aWxzLnJlc29sdmVUeXBlKG5vZGUsIGRzKTsNCiAgICBpZih0eXBlID09ICJGb2xkZXIiKSBjbWRzLl9pbm5lci5zcGxpY2UoMSwgMCwgUkRGLkdldFJlc291cmNlKGdOQ19OU19DTUQgKyAnYm1fbWFuYWdlZm9sZGVyJykgKTsNCiAgICBpZih0eXBlID09ICJQZXJzb25hbFRvb2xiYXJGb2xkZXIiKSBjbWRzLl9pbm5lci5zcGxpY2UoMSwgMCwgUkRGLkdldFJlc291cmNlKGdOQ19OU19DTUQgKyAnYm1fbWFuYWdlZm9sZGVyJykgKTsNCiAgICByZXR1cm4gY21kczsNCn0NCjwvc2NyaXB0Pg0KDQo8IS0tIEZpcmVmb3ggQm9va21hcmsgQ29udGV4dCBNZW51IC0tPg0KICA8bWVudXBvcHVwIGlkPSJib29rbWFya3MtY29udGV4dC1tZW51Ij4NCiAgICA8bWVudWl0ZW0gY29tbWFuZD0iY21kX2JtX21hbmFnZWZvbGRlciIgbGFiZWw9Ik1hbmFnZSBGb2xkZXIiLz4NCiAgPC9tZW51cG9wdXA%2BDQoNCjwvb3ZlcmxheT4%3D">Manage Bookmarks Folders</a>
Last edited by dougeeebear on May 21st, 2006, 12:44 pm, edited 4 times in total.

Old Greg S
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted May 19th, 2006, 2:58 pm

JNewbry wrote:
Before I post a link to it, I'll like to get yall's opinion on whether to incorporate the extension into ChromEdit Plus.
Yes, zeniko kindly gave me his permission for that...

Let me know.

I can already add it to the context menu and/or as a toolbarbutton, so if it's added as a fourth tab then I vote Yes.

pile0nades
 
Posts: 756
Joined: May 15th, 2005, 2:31 am

Post Posted May 19th, 2006, 7:37 pm

I made a version of the Super DragAndGo script with an option to use foreground or background tabs. The option is set using the code:
Code: Select all
//change this to false to use foreground tabs
var openTabsInBackground = true;


<a href="data:text/javascript;charset=utf-8;base64,LyogOjo6Ojo6OjogRHJhZyduJ2dvIChjZi4gU3VwZXIgRHJhZ0FuZEdvKSA6Ojo6Ojo6Ojo6Ojo6OjogKi8NCg0KY29udGVudEFyZWFETkRPYnNlcnZlci5vbkRyYWdPdmVyID0gZnVuY3Rpb24oYUV2ZW50LCBhRmxhdm91ciwgYURyYWdTZXNzaW9uKSB7DQoJYUV2ZW50LnRhcmdldC5zZXRBdHRyaWJ1dGUoImRyYWdvdmVyIiwgInRydWUiKTsNCgkNCglyZXR1cm4gKGFEcmFnU2Vzc2lvbi5jYW5Ecm9wID0gdHJ1ZSk7DQp9Ow0KDQpjb250ZW50QXJlYURORE9ic2VydmVyLl9fcHJlVUNfb25Ecm9wID0gY29udGVudEFyZWFETkRPYnNlc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QoJCQ0KCQl2YXIgZmxhdm91ciA9IHt9LCBkYXRhID0ge30sIGxlbmd0aCA9IHt9Ow0KCQl4ZmVyLmdldEFueVRyYW5zZmVyRGF0YShmbGF2b3VyLCBkYXRhLCBsZW5ndGgpOw0KCQl2YXIgeGZlckRhdGEgPSBuZXcgRmxhdm91ckRhdGEoZGF0YS52YWx1ZSwgbGVuZ3RoLnZhbHVlLCB0aGlzLmdldFN1cHBvcnRlZEZsYXZvdXJzKCkuZmxhdm91clRhYmxlW2ZsYXZvdXIudmFsdWVdKTsNCgkJDQoJCXJldHVybiB0cmFuc2ZlclV0aWxzLnJldHJpZXZlVVJMRnJvbURhdGEoeGZlckRhdGEuZGF0YSwgeGZlckRhdGEuZmxhdm91ci5jb250ZW50VHlwZSk7DQoJfQ0KCWNhdGNoIChleCkNCgl7DQoJCXJldHVybiBudWxsOw0KCX0NCn07DQoNCmdldEJyb3dzZXIoKS5hZGRFdmVudExpc3RlbmVyKCJkcmFnb3ZlciIsIGZ1bmN0aW9uKGFFdmVudCkgeyBuc0RyYWdBbmREcm9wLmRyYWdPdmVyKGFFdmVudCwgY29udGVudEFyZWFETkRPYnNlcnZlcik7IH0sIGZhbHNlKTsNCmdCcm93c2VyLmFkZEV2ZW50TGlzdGVuZXIoImRyb3AiLCBmdW5jdGlvbihhRXZlbnQpIHsgbnNEcmFnQW5kRHJvcC5kcmFnT3ZlcihhRXZlbnQsIGNvbnRlbnRBcmVhRE5ET2JzZXJ2ZXIpOyB9LCBmYWxzZSk7DQpnQnJvd3Nlci5hZGRFdmVudExpc3RlbmVyKCJkcmFnZ2VzdHVyZSIsIGZ1bmN0aW9uKGFFdmVudCkgeyBuc0RyYWdBbmREcm9wLnN0YXJ0RHJhZyhhRXZlbnQsIGNvbnRlbnRBcmVhRE5ET2JzZXJ2ZXIpOyB9LCB0cnVlKTsNCg%3D%3D">dragandgo.js</a>

I noticed this script also works for text searches in the 2.0 Bon Echo builds and the extension does not. One less extension I guess :).
Edit: fixed small bug dragging links into textboxes
Edit: fix again.
Last edited by pile0nades on May 21st, 2006, 6:01 pm, edited 2 times in total.
Linkify bug numbers - test: bug 258287

JNewbry

User avatar
 
Posts: 321
Joined: April 9th, 2005, 3:56 am
Location: Dallas,TX

Post Posted May 21st, 2006, 8:03 am

This is for userChrome.XUL
One of my pet peeves with Firefox has always been the "use small icons" disaster. You know what I'm talking about!?

<a href="data:application/x-javascript;charset=utf-8;base64,PG92ZXJsYXkgaWQ9InRvb2xiYXJjb25maWciDQogICB4bWxucz0iaHR0cDovL3d3dy5tb3ppbGxhLm9yZy9rZXltYXN0ZXIvZ2F0ZWtlZXBlci90aGVyZS5pcy5vbmx5Lnh1bCI%2BDQo8c2NyaXB0IHR5cGU9ImFwcGxpY2F0aW9uL3gtamF2YXNjcmlwdCI%2BDQo8IVtDREFUQVsNCnZhciB0b29sYmFybW9kZV9jbGlja2VkVG9vbGJhciA9IG51bGw7DQoNCmZ1bmN0aW9uIHRvb2xiYXJtb2RlX29uUG9wdXBTaG93aW5nKGV2ZW50KSB7DQoJZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7DQp9DQoNCmZ1bmN0aW9uIHRvb2xiYXJtb2RlX3NldFRvb2xiYXJNb2RlKGVsdCkgew0KCWlmICh0b29sYmFybW9kZV9jbGlja2VkVG9vbGJhcikgew0KCQl2YXIgbW9kZSA9IGVsdC52YWx1ZTsNCgkJdG9vbGJhcm1vZGVfY2xpY2tlZFRvb2xiYXIuc2V0QXR0cmlidXRlKCJtb2RlIiwgbW9kZSk7DQoJCXZhciB0b29sYm94RG9jID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoIm5hdmlnYXRvci10b29sYm94Iikub3duZXJEb2N1bWVudDsNCgkJZHVtcCgndG9vbGJveERvYyA9Jyt0b29sYm94RG9jICsgJ1xuJyk7DQogIAl0b29sYm94RG9jLnBlcnNpc3QodG9vbGJhcm1vZGVfY2xpY2tlZFRvb2xiYXIuaWQsICJtb2RlIik7DQoJfQ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hcm1vZGVfc2V0VG9vbGJhck1vZGUodGhpcyk7Ii8%2BDQoJCQkJCTwvbWVudXBvcHVwPg0KCQkJCTwvbWVudT4NCgkJCQk8bWVudSBpZD0idG9vbGJhcm1vZGUtaWNvbnMtbWVudSIgbGFiZWw9Ikljb24gU2l6ZSI%2BDQoJCQkJCTxtZW51cG9wdXAgb25wb3B1cHNob3dpbmc9InRvb2xiYXJtb2RlX29uUG9wdXBTaG93aW5nKGV2ZW50KTsiPg0KCQkJCQkJPG1lbnVpdGVtIHZhbHVlPSJzbWFsbCIgbGFiZWw9IlNtYWxsIiB0eXBlPSJjaGVja2JveCINCgkJCQkJCQlvbmNvbW1hbmQ9InRvb2xiYXJtb2RlX3NldFRvb2xiYXJJY29ucyh0aGlzKTsiLz4NCgkJCQkJCTxtZW51aXRlbSB2YWx1ZT0ibGFyZ2UiIGxhYmVsPSJMYXJnZSIgdHlwZT0iY2hlY2tib3giDQoJCQkJCQkJb25jb21tYW5kPSJ0b29sYmFybW9kZV9zZXRUb29sYmFySWNvbnModGhpcyk7Ii8%2BDQoJCQkJCTwvbWVudXBvcHVwPg0KCQkJCTwvbWVudT4NCgkJCTwvbWVudXBvcHVwPg0KCQk8L21lbnU%2BDQoJPC9wb3B1cD4NCjwvb3ZlcmxheT4%3D">ToolbarConfig</a>

Adds a menu option below "Customize..." for small, large, text, text only...etc to individual toolbars.
It's from the <a href="https://addons.mozilla.org/firefox/568/">Toolbarmode</a> extension originally.
I've only got 1.5.0.3 to test on.... so no promises on the others.
Last edited by JNewbry on May 21st, 2006, 2:23 pm, edited 1 time in total.
<a href="http://webdesigns.ms11.net/chromeditp.html" target="_blank">ChromEdit Plus</a> | <a href="http://webdesigns.ms11.net/winstripethemes.html" target="_blank">Firefox Themes</a>

********
 
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post Posted May 21st, 2006, 10:50 am

JNewbry wrote:This is for userChrome.XUL
One of my pet peeves with Firefox has always been the "use small icons" disaster. You know what I'm talking about!?

<a href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ii8%2BDQoJCQkJCTwvbWVudXBvcHVwPg0KCQkJCTwvbWVudT4NCgkJCQk8bWVudSBpZD0idG9vbGJhcm1vZGUtaWNvbnMtbWVudSIgbGFiZWw9Ikljb24gU2l6ZSI%2BDQoJCQkJCTxtZW51cG9wdXAgb25wb3B1cHNob3dpbmc9InRvb2xiYXJtb2RlX29uUG9wdXBTaG93aW5nKGV2ZW50KTsiPg0KCQkJCQkJPG1lbnVpdGVtIHZhbHVlPSJzbWFsbCIgbGFiZWw9IlNtYWxsIiB0eXBlPSJjaGVja2JveCINCgkJCQkJCQlvbmNvbW1hbmQ9InRvb2xiYXJtb2RlX3NldFRvb2xiYXJJY29ucyh0aGlzKTsiLz4NCgkJCQkJCTxtZW51aXRlbSB2YWx1ZT0ibGFyZ2UiIGxhYmVsPSJMYXJnZSIgdHlwZT0iY2hlY2tib3giDQoJCQkJCQkJb25jb21tYW5kPSJ0b29sYmFybW9kZV9zZXRUb29sYmFySWNvbnModGhpcyk7Ii8%2BDQoJCQkJCTwvbWVudXBvcHVwPg0KCQkJCTwvbWVudT4NCgkJCTwvbWVudXBvcHVwPg0KCQk8L21lbnU%2BDQoJPC9wb3B1cD4NCjwvb3ZlcmxheT4%3D">ToolbarConfig</a>

Adds a menu option below "Customize..." for small, large, text, text only...etc to individual toolbars.
It's from the <a href="https://addons.mozilla.org/firefox/568/">Toolbarmode</a> extension originally.
I've only got 1.5.0.3 to test on.... so no promises on the others.

That's just what i needed! thanks.
this is what i used before as a hack:
Code: Select all
document.getElementById("PersonalToolbar").setAttribute("iconsize", "small");

JNewbry

User avatar
 
Posts: 321
Joined: April 9th, 2005, 3:56 am
Location: Dallas,TX

Post Posted May 21st, 2006, 12:41 pm

Image

What I finally ended up doing with ChromEdit Plus.

If interested... <a href="http://webdesigns.ms11.net/chromeditpSE.html">ChromEdit Plus SE</a>
<a href="http://webdesigns.ms11.net/chromeditp.html" target="_blank">ChromEdit Plus</a> | <a href="http://webdesigns.ms11.net/winstripethemes.html" target="_blank">Firefox Themes</a>

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted May 22nd, 2006, 8:19 am

This is for userChrome.JS
Taken from the Disable Backspace Navigation extension, this removes the back navigation function from the backspace key.
Great for when forum posting and you hit the backspace key, only to be taken to the previous page.

<a href="data:application/x-javascript;charset=utf-8;base64,ZnVuY3Rpb24gRGlzYWJsZUJhY2tzcGFjZU5hdmlnYXRpb24gKCkKewoJdGhpcy5yZW1vdmVLZXkgPSBmdW5jdGlvbiAoa2V5c2V0KQoJewoJCXZhciBrZXlzID0ga2V5c2V0LmdldEVsZW1lbnRzQnlUYWdOYW1lICgia2V5Iik7CgkJZm9yICh2YXIgbiA9IDA7IG4gPCBrZXlzLmxlbmd0aDsgbisrKQoJCXsKCQkJdmFyIGtleSA9IGtleXNbbl07CgkJCWlmIChrZXkudGFnTmFtZSAhPSAia2V5IikKCQkJewoJCQkJY29udGludWU7CgkJCX0KCgkJCWlmIChrZXkuZ2V0QXR0cmlidXRlICgia2V5Y29kZSIpICE9ICJWS19CQUNLIikKCQkJewoJCQkJY29udGludWU7CgkJCX0KCgkJCWlmIChrZXkuZ2V0QXR0cmlidXRlICgiY29tbWFuZCIpICE9ICJjbWRfaGFuZGxlQmFja3NwYWNlIikKCQkJewoJCQkJY29udGludWU7CgkJCX0KCgkJCWtleS5yZW1vdmVBdHRyaWJ1dGUgKCJjb21tYW5kIik7CgkJCWtleS5yZW1vdmVBdHRyaWJ1dGUgKCJrZXljb2RlIik7CgkJfQoJfQoKCgl0aGlzLnRyYXZlcnNlS2V5c2V0cyA9IGZ1bmN0aW9uICgpCgl7CgkJdmFyIGtleXNldHMgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSAoImtleXNldCIpOwoJCWZvciAodmFyIG4gPSAwOyBuIDwga2V5c2V0cy5sZW5ndGg7IG4rKykKCQl7CgkJCXZhciBrZXlzZXQgPSBrZXlzZXRzW25dOwoJCQlpZiAoa2V5c2V0LnRhZ05hbWUgIT0gImtleXNldCIpCgkJCXsKCQkJCWNvbnRpbnVlOwoJCQl9CgoJCQlpZiAoa2V5c2V0LmdldEF0dHJpYnV0ZSAoImlkIikgIT0gIm1haW5LZXlzZXQiKQoJCQl7CgkJCQljb250aW51ZTsKCQkJfQoKCQkJdGhpcy5yZW1vdmVLZXkgKGtleXNldCk7CgkJfQoJfQoKCXRoaXMudHJhdmVyc2VLZXlzZXRzICgpOwp9Cgp2YXIgZGlzYWJsZUJhY2tzcGFjZU5hdmlnYXRpb24gPSBuZXcgRGlzYWJsZUJhY2tzcGFjZU5hdmlnYXRpb24gKCk7Cgo%3D">DisableBackspaceNavigation</a>

For Firefox 1.0.7 and 1.5.0.*

JNewbry

User avatar
 
Posts: 321
Joined: April 9th, 2005, 3:56 am
Location: Dallas,TX

Post Posted May 22nd, 2006, 8:58 am

This is for userChrome.XUL
Purpose... To feed anyone's <a href="http://en.wikipedia.org/wiki/Obsessive-compulsive_disorder">Obsessive-Compulsive Disorder</a> for Page Validation.
Adds "Validate Page" to the context menu. Works on local files too!

<a href="data:application/x-javascript;charset=utf-8;base64,PG92ZXJsYXkgaWQ9InZhbGlkYXRlcGFnZSINCiAgICAgICAgIHhtbG5zPSJodHRwOi8vd3d3Lm1vemlsbGEub3JnL2tleW1hc3Rlci9nYXRla2VlcGVyL3RoZXJlLmlzLm9ubHkueHVsIj4NCg0KPHNjcmlwdCB0eXBlPSJhcHBsaWNhdGlvbi94LWphdmFzY3JpcHQiPg0KPCFbQ0RBVEFbDQpmdW5jdGlvbiB2YWxpZGF0ZSgpIHsNCnZhciBzb3VyY2VXaW5kb3c7DQp2YXIgaHRtbF94Ow0KdmFyIHRhcmdldFVSSSA9IGdldFdlYk5hdmlnYXRpb24oKS5jdXJyZW50VVJJLnNwZWM7DQpzb3VyY2VXaW5kb3cgPSBnZXRCcm93c2VyKCkuYWRkVGFiKCd2aWV3LXNvdXJjZTonK3RhcmdldFVSSSk7DQpnZXRCcm93c2V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WxrZXIgPSBjb250ZW50LmRvY3VtZW50LmNyZWF0ZVRyZWVXYWxrZXIocHJlLCBOb2RlRmlsdGVyLlNIT1dfVEVYVCwgbnVsbCwgZmFsc2UpOw0KICANCiAgICAgIGZvciAodmFyIHRleHROb2RlID0gdHJlZXdhbGtlci5maXJzdENoaWxkKCk7DQogICAgICAgICAgIHRleHROb2RlOw0KICAgICAgICAgICB0ZXh0Tm9kZSA9IHRyZWV3YWxrZXIubmV4dE5vZGUoKSkgDQogICAgICB7ICANCiAgICAgICAgc0h0bWwgPSBzSHRtbCArIHRleHROb2RlLmRhdGE7ICAgICAgICANCiAgICAgIH0NCiAgICB9DQogICANCiAgICByZXR1cm4gc0h0bWw7DQogIH0NCl1dPg0KPC9zY3JpcHQ%2BDQoNCjxwb3B1cCBpZD0iY29udGVudEFyZWFDb250ZXh0TWVudSI%2BDQogIDxtZW51aXRlbSBpZD0idmFsaWRhdGVpdCIgbGFiZWw9IlZhbGlkYXRlIFBhZ2UiIGFjY2Vzc2tleT0iViIgDQogIGluc2VydGFmdGVyPSJjb250ZXh0LXN0b3AiIG9uY29tbWFuZD0idmFsaWRhdGUoKTsiLz4NCjwvcG9wdXA%2BDQoNCjwvb3ZlcmxheT4%3D">Validate Page</a>

This is condensed from the <a href="https://addons.mozilla.org/firefox/2520/">Offline Page Validator</a> extension.

*Corrected - Thanks Phil! Thanks zeniko!
Last edited by JNewbry on May 22nd, 2006, 11:31 am, edited 2 times in total.
<a href="http://webdesigns.ms11.net/chromeditp.html" target="_blank">ChromEdit Plus</a> | <a href="http://webdesigns.ms11.net/winstripethemes.html" target="_blank">Firefox Themes</a>

Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted May 22nd, 2006, 9:11 am

JNewbry wrote:Adds "Validate Page" to the context menu. Works on local files too!

<a href="data:application/x-javascript;charset=utf-8 ;base64,PG92ZXJsYXkgaWQ9InZhbGlkYXRlcGFnZSINCiAgICAgICAgIHhtbG5zPSJod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b21tYW5kPSJ2YWxpZGF0ZSgpOyIvPg0KPC9wb3B1cD4NCg0KPC9vdmVybGF5Pg%3D%3D">Validate Page</a>
window._content is depreciated. Please use window.content instead.

Phil

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 1 guest