Motohiko wrote:The locationbar uses <xul:textbox> widget, and <xul:textbox> widget is binded to <html:input> widget.
Indeed. Remember that the namespace gives you XUL vs HTML, not chrome vs. content. They'll be the same thing in 95% of cases, but here's one exception.
to each style you want to always show up. This won't do anything other than make Stylish think the style applies to all (http) pages.
I noticed that last night. url-prefix(http) is probably better as it'll catch https:// too.
np wrote:(Actually this kind of trick might work for the first problem too.)
Well, if you could wrap everything inside of @-moz-document(http), but I already make heavy use of @-moz-document() and you can't have one inside of another. Guess I could just wrap the general stuff...
np wrote:
logan wrote:Is there any additional overhead beyond what the user{Chrome,Content}.css equivalents use?
There's a bit of time spent at app startup to register all the styles, but between loading pages there should be no difference between user*.css and Stylish.
desertfox wrote:i was trying to customize the Stylish statusbar icon (no offense to your original, it's great), but when i used the following code, clicking on the icon no longer brought up the menu!
Looks like a Gecko bug. Switching from opacity: 0 to visibility:hidden seems to make it work.
logan wrote:I'm getting this when trying to add a new style after deleting all of the builtin styles on the first run after installing stylish (get all that? ):
Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]" nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)" location: "JS frame :: chrome://browser/content/utilityOverlay.js :: getShellService :: line 329" data: no
Had to remove all rules, then exit before it'd take anything new. It's ok if you add a new one with one or more of the builtin remaining.
I got another error.
Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIRDFContainer.AppendElement]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://stylish/content/rdfds.js :: anonymous :: line 582" data: no
And there is a comment in the code:
//for some reason, this will throw if you delete everything then add in the same session.
The author of Search Engine Ordering tells me that he's loaded a new version of 0.5.2 onto his website which removes the conflict, so anyone who wants to run both should uninstall SEO and reinstall it from there. Future versions of SEO will not conflict with Stylish.
np wrote:The author of Search Engine Ordering tells me that he's loaded a new version of 0.5.2 onto his website which removes the conflict, so anyone who wants to run both should uninstall SEO and reinstall it from there. Future versions of SEO will not conflict with Stylish.
TypeError: containedDocShells.getNext().QueryInterface(Components.interfaces.nsIDocShell).contentViewer has no properties
alert when I'm trying to add or edit a rule which is being used on the current tab if Adblock is enabled. I can't enable or disable rules using the Stylish context menu either, it silently fails.
Disabling Adblock (using the context menu on the adblock icon) allows me to do both normally.
while (containedDocShells.hasMoreElements()) { // Get the corresponding document for this docshell docs[docs.length] = containedDocShells.getNext().QueryInterface(Components.interfaces.nsIDocShell).contentViewer.DOMDocument; }
while (containedDocShells.hasMoreElements()) { // Get the corresponding document for this docshell var viewer = containedDocShells.getNext().QueryInterface(Components.interfaces.nsIDocShell).contentViewer; // Adblock might block iframes/frames. Null check the content viewer. if (viewer) { docs[docs.length] = viewer.DOMDocument; } }
this.deleteStyle = function() { var styles = this.getSelectedStyles(); for (var i = 0; i < styles.length; i++) { var node = stylishCommon.ds.getNode(styles[i]); //unapply the style if it's applied if (node.getTarget(stylishCommon.enabledURI).getValue() == "true") { stylishCommon.unregisterNode(node); } //delete it from the file stylishCommon.ds.deleteRecursive(node); }
+ // XXX to avoid the error below, add dummy entry and make always at lease one entry in the tree. + var container = stylishCommon.ds.getNode(stylishCommon.containerURI); + if (container.getChildCount() == styles.length){ + var node = stylishCommon.ds.getAnonymousNode(); + // XXX !!!MAKE LOCALIZABLE!!! + node.addTarget(stylishCommon.descriptionURI, "New Style"); + node.addTarget(stylishCommon.enabledURI, "false"); + node.addTarget(stylishCommon.codeURI, ""); + container.addChild(node); + } stylishCommon.ds.save(); stylishCommon.ds.refresh(true);
//XXX there's a bug somewhere that deleting a style will make all the styles below it not display. to work around this, refresh the tree //remember scroll position. don't remember selection, because everything selected will have been deleted! var topVisibleRow = this.getTopVisibleRow();
mozillaZine is an independent Mozilla community and advocacy site. We're not affiliated or endorsed by the Mozilla Corporation but we love them just the same.