开发者

Using Themeroller Bookmarklet

I want to make my jQuery-UI-using webpage themeable with the Themeroller Firefox bookmarklet. When I open the bookmarklet on the themeroller demopage, everything changes like expected. On my own page, or on other example开发者_如何学JAVA pages only the URL changes but the style isn't applied.

I need the developer tool, to find the final style of jQuery-UI in my existing webpage. How can I get that working?

I used Firefox and I put my page on a webserver, so no Firefox doesn't apply local security restrictions.


I had the same issue. This link solved my problem.

To summarize: something is not playing nice with versions of FF above version 10.

To fix: right-click your bookmark for "ThemeRoller Dev Tool", go to 'Properties'.
Change 'Location:' to this -->

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="http://jqueryui.com/themeroller/developertool/developertool.js.php";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="http://jqueryui.com/themeroller/css/parseTheme.css.php?'+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)}}})();

Then 'Save'. This solved it for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜