]> 91.132.146.200 Git - insipid.git/commitdiff
FF_EXT: Fixed "save to Insipid" links on del.icio.us pages.
authordannym <dannymiles2@gmail.com>
Thu, 5 Aug 2010 22:16:08 +0000 (00:16 +0200)
committerdannym <dannymiles2@gmail.com>
Thu, 5 Aug 2010 22:16:08 +0000 (00:16 +0200)
ff_ext/inspd@danny/chrome/inspd/content/inc/globals.js

index bc01b1d355742adf7ba0f7de42fab6730890aa01..a250a8c104adbee85684c56cabbc2bf5461f502a 100644 (file)
@@ -525,8 +525,13 @@ var $delpage = {
                    var metaNode = null;\r
                var tagsNode = null ;\r
                var original_save_link_href = row.getElementsByTagName('a')[1].getAttribute('href'); \r
-               original_save_link_href = original_save_link_href.replace(/^\/save;_y(.*)\?/,$prefs.get('defurl')+'?op=add_bookmark&');\r
-               original_save_link_href = original_save_link_href.replace(/jump=(.*)original_user=/,'copy_user=');\r
+               if(original_save_link_href.match(/^\/save;_y(.*)\?/)){\r
+                               original_save_link_href = original_save_link_href.replace(/^\/save;_y(.*)\?/,$prefs.get('defurl')+'?op=add_bookmark&');\r
+               }\r
+                       else{\r
+                               original_save_link_href = original_save_link_href.replace(/^\/save\?/,$prefs.get('defurl')+'?op=add_bookmark&');\r
+               }\r
+                       original_save_link_href = original_save_link_href.replace(/jump=(.*)original_user=/,'copy_user=');\r
                original_save_link_href = original_save_link_href.replace(/%20/g,'+');\r
                var new_save_link_href = original_save_link_href ; \r
                row.innerHTML += ' <a class="inlinesave" target="_blank" title="save this bookmark to Insipid" href="'+new_save_link_href+'">SAVE TO INSIPID</a>';\r