{"id":607,"date":"2010-08-24T07:55:51","date_gmt":"2010-08-24T13:55:51","guid":{"rendered":"http:\/\/www.curtisgibby.com\/blog\/?p=607"},"modified":"2010-08-24T09:02:41","modified_gmt":"2010-08-24T15:02:41","slug":"syncing-stylish-userstyles-with-dropbox","status":"publish","type":"post","link":"https:\/\/www.curtisgibby.com\/blog\/2010\/08\/syncing-stylish-userstyles-with-dropbox\/","title":{"rendered":"Syncing Stylish userstyles with Dropbox"},"content":{"rendered":"<p><a href=\"http:\/\/www.curtisgibby.com\/blog\/wp-content\/uploads\/2010\/08\/stylish1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-611\" title=\"Stylish\" src=\"http:\/\/www.curtisgibby.com\/blog\/wp-content\/uploads\/2010\/08\/stylish1.png\" alt=\"\" width=\"177\" height=\"175\" \/><\/a>I&#8217;ve used Firefox&#8217;s <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/2108\/\">Stylish plugin<\/a> for years to get rid of stuff that I don&#8217;t want to see on all kinds of web sites.\u00a0 Once you know how CSS works, the plugin makes it easy to tweak the look of any page by adding a quick {width:100%;} or {display:none;} to your own personalized CSS userstyle for each site.<!--more--><\/p>\n<p>The one gripe I&#8217;ve had with Stylish is that it doesn&#8217;t automatically let you sync your styles across computers.\u00a0 I&#8217;d make a change to a site&#8217;s style on my work computer, then get frustrated that I had to make the same change on my home machine.\u00a0 I keep hoping that <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/10868\/\">Firefox Sync<\/a> (formerly Weave) will add support for syncing the file where Stylish stores its content (a sqlite file called, creatively enough, stylish.sqlite), but it hasn&#8217;t happened yet.<\/p>\n<p><a href=\"http:\/\/www.curtisgibby.com\/blog\/wp-content\/uploads\/2010\/08\/dropbox_logo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-613\" title=\"dropbox_logo\" src=\"http:\/\/www.curtisgibby.com\/blog\/wp-content\/uploads\/2010\/08\/dropbox_logo.png\" alt=\"\" width=\"231\" height=\"60\" \/><\/a>But then I came up with the idea of userstyle syncing via <a href=\"http:\/\/www.dropbox.com\">Dropbox<\/a> &#8212; it&#8217;s a great service and I already had the client installed on all of the computers that I wanted to sync, so I just had to figure out how to do it.\u00a0 <a href=\"http:\/\/archive.robwilkerson.org\/2008\/11\/12\/redux-synchronizing-firefox-through-dropbox\/index.html\">This blog entry<\/a> by Rob Wilkerson talked about how to sync all of your Firefox preferences and bookmarks; I already had that part covered with Firefox Sync, but it was the inspiration for me to get off my butt and make my Stylish dreams come true.<\/p>\n<p>At first I thought I&#8217;d have to copy my sqlite file into the Dropbox, then make symlinks in my Firefox folder to that file, like Rob did.\u00a0 They&#8217;re called Junctions in Windows parlance, and they&#8217;re a little more tricky to work with than symlinks in *nix.\u00a0 (But they are <a href=\"http:\/\/www.howtogeek.com\/howto\/windows-vista\/using-symlinks-in-windows-vista\/\">natively supported in Windows Vista and up<\/a>, which two out of the three machines I&#8217;d be syncing were running.\u00a0 I&#8217;d have to download a special program to get it working in XP on my old laptop.)<\/p>\n<p>But when I poked around a bit in about:config, I found this option: <strong>extensions.stylish.dbFile<\/strong>.\u00a0 It was set to the full file path of the stylish.sqlite file in my Firefox profile directory.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-616\" title=\"about-config-stylish\" src=\"http:\/\/www.curtisgibby.com\/blog\/wp-content\/uploads\/2010\/08\/about-config-stylish.png\" alt=\"\" width=\"595\" height=\"149\" srcset=\"https:\/\/www.curtisgibby.com\/blog\/wp-content\/uploads\/2010\/08\/about-config-stylish.png 595w, https:\/\/www.curtisgibby.com\/blog\/wp-content\/uploads\/2010\/08\/about-config-stylish-300x75.png 300w\" sizes=\"auto, (max-width: 595px) 100vw, 595px\" \/><\/p>\n<p>I tried copying the file into my Dropbox, then setting the value of the dbFile option to that file path instead.\u00a0 (&#8220;C:\\Users\\Curtis\\Documents\\My Dropbox\\stylish.sqlite&#8221; in my case.)\u00a0 When I restarted Firefox, my styles were working right, and I was able to make a change in a userstyle and see Dropbox re-upload it to the cloud.<\/p>\n<p><a href=\"http:\/\/www.curtisgibby.com\/blog\/wp-content\/uploads\/2010\/08\/dropbox-stylish.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-617\" title=\"dropbox-stylish\" src=\"http:\/\/www.curtisgibby.com\/blog\/wp-content\/uploads\/2010\/08\/dropbox-stylish.png\" alt=\"\" width=\"326\" height=\"219\" srcset=\"https:\/\/www.curtisgibby.com\/blog\/wp-content\/uploads\/2010\/08\/dropbox-stylish.png 326w, https:\/\/www.curtisgibby.com\/blog\/wp-content\/uploads\/2010\/08\/dropbox-stylish-300x201.png 300w\" sizes=\"auto, (max-width: 326px) 100vw, 326px\" \/><\/a>So then I just had to go into about:config on all of the other client machines and change the extensions.stylish.dbFile option to the path of the Dropbox stylish.sqlite file on that machine.\u00a0 It works perfectly! I can add a bit of CSS to Stylish on any one of the computers and it is automatically reflected in the other copies of Firefox on the other computers.<\/p>\n<p>This is a brute-force method: you don&#8217;t have the option of automatically merging the styles from the various client computers into the unified stylish.sqlite like you would with Firefox Sync, but my userstyles were pretty close across the computers anyway, so it wasn&#8217;t a big deal.\u00a0 Hooray for Firefox, for Stylish, and for Dropbox!\u00a0 Great software all around, and like peanut butter and chocolate, they go even better together!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The one gripe I had with Stylish is that it doesn&#8217;t automatically let you sync your styles across computers. But then I came up with the idea of keeping userstyles synced up via Dropbox, and now it works great!  I&#8217;ll show you how to do it here.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[119,116,117,118],"class_list":["post-607","post","type-post","status-publish","format-standard","hentry","category-programming","tag-dropbox","tag-firefox-sync","tag-stylish","tag-userstyles","entry"],"_links":{"self":[{"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/posts\/607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/comments?post=607"}],"version-history":[{"count":6,"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/posts\/607\/revisions"}],"predecessor-version":[{"id":615,"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/posts\/607\/revisions\/615"}],"wp:attachment":[{"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/media?parent=607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/categories?post=607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/tags?post=607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}