Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#8149 closed bug (wontfix)

correction to ThemeRoller - does not work on pages other than the demo page

Reported by: mdeweerd Owned by: mdeweerd
Priority: minor Milestone: 1.9.0
Component: [meta] ui.themeroller Version: 1.8.18
Keywords: Cc:
Blocked by: Blocking:



I can't get the themeroller to work on any page different from the demo page.

I started debugging and discovered that in 'developertool.js.php' the following line :

if( $("link[href*=parseTheme.css.php], link[href=ui.theme.css]").size() > 0){

should be written as:

if( $("link[href*='parseTheme.css.php'], link[href='ui.theme.css']").size() > 0){

There are several other lines requiring a similar change.

Without these extra single quotes, the interactive console in firefox says: Error: Syntax error, unrecognized expression: [href*=parseTheme.css.php] (from jQuery.js).

Concretely, doing: jquitr.reloadCSS = function(){ var currSrc = jquitr.getHash(), cssLink; if(jquitr.trString !== currSrc && currSrc !== ){ jquitr.trString = currSrc; cssLink = '<link href="'+ currSrc +'" type="text/css" rel="Stylesheet" />'; works for both 1.6 final and early rc's if( $("link[href*='parseTheme.css.php'], link[href='ui.theme.css']").size() > 0){ $("link[href*='parseTheme.css.php']:last, link[href='ui.theme.css']:last").eq(0).after(cssLink); } else { $("head").append(cssLink); } if( $("link[href*='parseTheme.css.php']").size() > 3){ $("link[href*='parseTheme.css.php']:first").remove(); } } window.setTimeout(jquitr.reloadCSS, 1000); };

and then running jquitr.reloadCSS();

works for me.

Change History (6)

comment:1 Changed 11 years ago by mdeweerd

I uploaded the modified code to

comment:2 Changed 11 years ago by mdeweerd

I've also modified my Themeroller shortcut to be: javascript:(function(){if(!/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){alert("Sorry,%20due%20to%20security%20restrictions,%20this%20tool%20only%20works%20in%20Firefox");return%20false}else{if(window.jquitr){jquitr.addThemeRoller()}else{jquitr={};jquitr.s=document.createElement("script");jquitr.s.src="";document.getElementsByTagName("head")[0].appendChild(jquitr.s);var%20a=function(){jquitr.reloadCSS=function(){var%20c=jquitr.getHash(),b;if(jquitr.trString!==c&&c!==""){jquitr.trString=c;b='<link%20href="'+c+'"%20type="text/css"%20rel="Stylesheet"%20/>';if($("link[href*='parseTheme.css.php'],%20link[href='ui.theme.css']").size()>0){$("link[href*='parseTheme.css.php']:last,%20link[href='ui.theme.css']:last").eq(0).after(b)}else{$("head").append(b)}if($("link[href*='parseTheme.css.php']").size()>3){$("link[href*='parseTheme.css.php']:first").remove()}}window.setTimeout(jquitr.reloadCSS,1000)};jquitr.reloadCSS()};window.setTimeout(a,1100)}}})();

which works ;-) (and proves that this solves the issue).

comment:3 Changed 10 years ago by Scott González

Owner: changed from jquery-infrastructure to mdeweerd
Status: newpending

Can you clarify what you're referring to? ThemeRoller, ThemeRoller bookmarklet, or ThemeSwitcher? ThemeRoller proper only exists on

comment:4 Changed 10 years ago by Scott González

Resolution: wontfix
Status: pendingclosed

Noticing that you're using a javascript: URL, this must be the bookmarklet.

We're no longer supporting the ThemeRoller bookmarklet. Please either use Dave Hoff's Super Theme Switcher or go to the ThemeRoller page directly.

comment:5 Changed 10 years ago by mdeweerd


I understand that you no longer support the bookmarklet. I kindly propose that you consider the following:

  • As the themeroller bookmarklet does not work 'as is', remove it from the page where it is proposed.
  • Other people have the same issue, and even propose solutions to get it work with the latest firefox version ( );
  • Suggest 'Super Theme Switcher' in the above forum entry;
  • As there are proposed fixes, integrate these proposed fixes as the bookmarklet link in the existing page;
  • That any of these solutions will avoid many users and developers trying the bookmarklet followed by some effort to understand why it does not work and find (or not find) the workaround(s) for it.

I appreciate that jQuery is public and for free, and I understand that you try to limit your effort. When I opened this ticket I tried to share my solution and reduce the effort for others on this planet.

I'ld appreciate that you show somehow that this message is acknowledged as I can not reopen the ticket.

Kind regards


comment:6 Changed 10 years ago by Scott González

The link is removed from the new site which will go live with the 1.9.0 release. I replied to the linked forum thread. We're obviously not going to incorporate any fixes for something that we're no longer supporting. That's the definition of not supporting.

Note: See TracTickets for help on using tickets.