Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Installing Styles For Firefox

edited November 2017 in Stylish Firefox
Hello, Stylish has just been updated, and I've been trying to reinstall my Stylish themes for Firefox, but I can't reinstall them. Can someone please help me? Also, I keep getting an error with the Stylish database. Please can you fix this?
«1

Comments

  • edited November 2017 Firefox
    Hi Caroline, if you are not yet on Firefox 57, could you try rolling back to version 2.1.1 of Stylish for Firefox:

    https://addons.mozilla.org/firefox/addon/stylish/versions/

    Does that version work? It should migrate your data from the old Legacy extension storage to the new WebExtensions storage. That may not fix the database, but it's the best I can suggest at the moment until there is an official explanation.

    If it does work, I suggest going to the Add-ons page, User Styles section, and using the Export button to make a backup for future reference.
  • edited November 2017 Firefox
    Thank you so much, Jefferson! That really helped! But now, I'm having trouble getting player styles to show up. How can I fix this?
  • Sorry, what do you mean by player styles?
  • I mean that when I install player styles like the Nyan Cat progress bar theme, they only show up as a white square and I was wondering how to fix this?
  • Hmm, I don't know.

    https://userstyles.org/styles/95033/youtube-nyan-cat-progress-bar-video-player-theme

    That one works for me, but I never installed 3.0, I've stayed on 2.1.1. Hopefully someone familiar with the internals of the extension can help.
  • edited November 2017 Firefox
    Okay, I'll try that. By the way, Stylish updated again so I rolled it back again. How can I migrate my styles so that I don't lose them?
  • Firefox 2.1.1 is supposed to migrate your styles to WebExtensions storage automatically where Stylish 3.0 finds them. But... I don't know what you're supposed to do if that doesn't work. (Note: styles that apply to Firefox itself can't be applied in Stylish 3.0 or Stylus; they need to be added to a userChrome.css file.)

    I have a tool on my website to create an HTML page you could use to copy/paste your existing styles (one by one) into the Stylish 3.0 editor. Hopefully someone from userstyles.org will chime in with a simpler solution.

    https://www.jeffersonscher.com/res/stylishextract.html

    (Your stylish.sqlite database is in your profile folder: https://support.mozilla.org/kb/profiles-where-firefox-stores-user-data )
  • I experimented with Stylish 3.0.1 in a new profile. I copied over my stylish.sqlite, installed Stylish 2.1.1, then after the data was extracted, updated to Stylish 3.0.1.

    Surprise! Only 14 of my 108 user styles were listed in the Manage All Styles screen in the new Stylish. These were the user styles that were installed from userstyles.org and applied to at least one web page (the ones that applied only to the interface were, of course, not listed). They were all automatically enabled even though I had most of them disabled before. What a mess...

    There is an "About this version" page which shows the original user styles so you can manually copy/paste your "locally created" styles to new Stylish 3 user styles. It also lets you recover any manually edited user styles that were overridden by being re-downloaded from userstyles.org. The attached screenshot shows where you can find the link.

    I added a section on this to my page here:

    https://www.userchrome.org/alternatives-to-stylish.html#migration

    Note: That was tested in Firefox 56.0.2.
    848 x 298 - 35K
  • edited November 2017 Firefox
    Thanks for your help, but I keep getting an error that says "An error has occurred using the Stylish database. Would you like to visit a web page with possible solutions?" whenever I click on the Stylish 3 icon. How can I fix this?
  • I asked this two days ago, but I'm having trouble opening Stylish 3 which keeps saying "An error has occurred using the Stylish database. Would you like to visit a web page with possible solutions?" Also, Stylish says that I have no styles for pages that I do have styles installed for whenever I open it on those pages. What can I do about this?
  • So far, I have not seen an official explanation or solution. In my research, two reasons that an extension might not be able to access its database are:

    (1) Firefox set not to accept cookies
    (2) Firefox set to start up automatically in private browsing mode

    That would affect ALL extensions which used IndexedDB databases to store information, not just Stylish and Stylus. But there is at least one other user who says that is not the issue. https://forum.userstyles.org/discussion/61301/error-has-occurred-using-the-stylish-database
  • edited November 2017 Firefox
    Thank you for your help, but my Firefox accepts cookies and I'm not starting in Private Browsing Mode. What can I do about this?
  • If there is no effective tech support for Stylish 3.0 (hello Stylish people?!) you may need to try an alternative such as Stylus. https://addons.mozilla.org/firefox/addon/styl-us/
  • Thanks, Jefferson. I may have to do that until they can fix Stylish.
  • Hello, I forgot how to transfer my old styles to Stylish. Do you know how to do this?
  • Hello, I forgot how to transfer my old styles to Stylish. Do you know how to do this?

    Do you mean from Stylish 2 (Legacy) to Stylish 3 (WebExtensions)? If that did not happen automatically, you can extract your style from the Stylish 2 database file. I have a tool for that here:

    https://www.jeffersonscher.com/res/stylishextract.html
  • edited March 16 Firefox
    Yes I do. Thank you, but I keep getting an error saying there was an error with the database. What can I do about this? Also, I've extracted my styles as a .json file, but how do I add them to Stylish?
  • Hi Caroline, everything I know about the database problem has been mentioned previously in this thread.
  • edited March 19 Firefox
    Yes, but I've waited until Firefox 59 has come out and my old styles haven't transferred. What shall I do about this? Also, I try and retrieve my backup, but it says I have 0 styles installed and I get a database error. What can I do about this?
  • edited March 21 Firefox
    I tried doing what it said on Manual Migration, by clicking on "All Personal Styles" in the "Export to JSON" option, but I got a message saying "0 styles installed/updated." How can I fix this?
  • I tried doing what it said on Manual Migration, by clicking on "All Personal Styles" in the "Export to JSON" option, but I got a message saying "0 styles installed/updated." How can I fix this?

    Is that a message from my page? I think that's a message from Stylish.

    If you open your exported JSON file in Firefox in its own tab, after a few moments, Firefox should give you a structured view of the file contents. Do they look anything like this:

    https://www.userchrome.org/img/sample-export-file.png

    If the file looks okay, then we have the second issue of why it won't import...
  • It was a message from Stylish, but thanks for your help. I'll look into that tomorrow.
  • edited March 22 Firefox
    I tried opening it in Notepad, and here's what I got: []. Did I open the file wrong, and, if so, how can I open it in Firefox? And if the file really is blank, should I copy and paste the style data into the .json file?
  • If the file consists of nothing other than the two characters [] then the export didn't work correctly, or the stylish.sqlite database didn't contain any "personal" styles. Could you try exporting "All Styles" and see whether that works any better?

    Note that the .json file will be easier to read in a Firefox tab than in Notepad.
  • Thanks for your help. By the way, how can I open the .json file in Firefox?
  • By the way, how can I open the .json file in Firefox?

    You either can use Open File from the menu, or drag and drop the .json file into an open tab.
  • Thanks. I tried "Export All Styles" and the styles exported properly, but when I try to retrieve backup in Stylish, I can't see the styles and they still won't show up on my webpages and the ID says 'null' for all of my styles. Do you think that could be causing a problem, and, if so, how can I solve it?
  • Hi, how did you confirm that the file contains your user styles? Were you able to open the .json file in a Firefox tab and see your user styles listed?

    I think a new ID is created when you import/restore, so the old ID isn't needed.
  • Yes, I did open the .json file in Firefox. The problem is why my styles aren't showing up even though I clicked "Retrieve Backup". How can I fix this?
Sign In or Register to comment.