Import?
|
|
Hey, Looks like you have a good updater script here. :) One problem for me.. I have about 20 different scripts
If not, I suggest an import feature. :) Chris |
|
|
No, you don't need to. Have you read the Updates post? http://userscripts.org/topics/18633 |
|
|
Yes I read it and only the scripts I installed after installing Userscripts Updater are showing. None of my already installed scripts show. |
|
|
Oh I see what you mean now. Yes, I had to reinstall the scripts in order to have Updater recognise the scripts I had installed before. |
|
|
Theres this updater by alien_scum which hacks its way to access the scripts in the disk, but I'm not sure it works anymore.
|
|
|
From what I understand alien_scum's script dances around permissions. It seems incredibly difficult to me, but would make your script much more useful. It is currently broken but one user claims to have fixed it http://userscripts.org/topics/14721?page=3#post... |
|
|
I can't seem to get that working (also the patched version). It doesn't do anything. Doesn't open a tab like it says it should. |
|
|
I've learned quite a bit from that script, very creative code. |
|
|
Okay When I Try The Import I Get Two Errors :( [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIDOMLocation.href]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: file:///C:/Users/Seth/AppData/Roaming/Mozilla/Firefox/Profiles/8d4vh6d1.default/extensions/%7Be4a8a97b-f2ed-450b-b12d-ee082ba24781%7D/components/greasemonkey.js :: importFromDisk :: line 712" data: no] And TypeError: objImportSearch.scriptAttr[0] is undefined |
|
|
Matrix0191, for now the updater assumes you have your Firefox profile installed in that default location if you can, post your cache directory path in about:cache |
|
|
C:\Users\Seth\AppData\Local\Mozilla\Firefox\Profiles\8d4vh6d1.default\Cache There You Go |
|
|
try to paste the "C:\Users\Seth\AppData\Local\Mozilla\Firefox\Profiles\8d4vh6d1.default" at the options import field... |
|
|
lazyttrick, love your work. But don't forget your fans that use the Mozilla Firefox, Portable Edition from PortableApps.com. :) Might the updater script be stored in a different (incompatible) location? |
|
|
I decided to rewrite your path guessing code(mostly for Mac support). It works on both mac and linux, and I think it should work on Windows, but I don't have a PC so I can't test it on that.
try{
// Get the Cache path no matter what it is
path = document.body.innerHTML.match(/Cache Directory:<\/b><\/td>\n*<td><tt>\s*(.*)\s*<\/tt>/);
}catch(e){
}
if(win_path = path[1].match(/(\D:.*\\)\D*Cache/)) // Windows
{
// Untested
// <tt> X:\Users\<username>\AppData\Local\Mozilla\Firefox\Profiles\<profile>\Cache</tt>
// also works for X:\Users\<username>\AppData\Local\Mozilla\Firefox\Profiles\<profile>\OfflineCache for Firefox Portable
// X:\Users\<username>\AppData\Local\Mozilla\Firefox\Profiles\<profile>
path = 'file:///' + win_path[1].replace(/\\[^\\]+$/,'').replace(/\\/g,'\/').replace(/[^\/]+$/,'') + 'gm_scripts/config.xml';
}
else if (mac_path = path[1].match(/\/(Users\/.*)\/Cache/)) // Mac
{
// Confirmed to work
// <tt> /Users/<username>/Library/Caches/Firefox/Profiles/<profile>/Cache</tt>
// Users/<username>/Library/Application Support/Firefox/Profiles/<profile>
path = 'file:///' + mac_path[1].replace(/Caches/, 'Application Support') + '/gm_scripts/config.xml';
}
else if (linux_path = path[1].match(/\/(home\/.*)\/Cache/)) // Linux
{
// Confirmed to work(Ubuntu)
// <tt> /home/<username>/.mozilla/firefox/<profile>/Cache</tt>
// /home/<username>/.mozilla/firefox/<profile>
path = 'file:///' + linux_path[1] + '/gm_scripts/config.xml';
}
// If we caught the path then store it
if (path.match(/file:/)) GM_setValue('importPath', escape(path));
GM_setValue('import','doXML');
location.href = path;
break;
|
|
|
thanks, I'll take a look at this... |
|
|
thanks, I'll take a look at this... Cool. Love the script btw. |
|
|
glad to know :) much of the script came from collaboration and suggestions... It may take a while cause I'm always procrastinating, but... |
|
|
that's why you're called lazyttrick lol! Well if you could just confirm the code works in Windows then I know it works. I've checked in both OSX and Ubuntu. I wanted to check it in Windows but my damn VirtualBox is all fucked up right now. Which reminds me that I need to go get my MSDN login so I can download Vista for free. Maybe I'll check the code in that if I can get it setup tonight. Edit: Well I got it to work Portable Firefox(I had to change the code a little and so I edited the above code to match). I'm still not sure about Vista though. I can tell you, however, that my code does not work on Windows 7, and I don't know why. |