From: Banana Date: Fri, 16 Dec 2016 11:56:43 +0000 (+0100) Subject: starting fresh X-Git-Tag: 2.1-alpha-2019-0-29~60 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=1eeda1a84eccaee4655789fe599af69be238829e;p=insipid.git starting fresh --- diff --git a/.gitignore b/.gitignore index c7152ad..966a7da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -insipid-config.cgi .project -.htaccess -phantomjs +.buildpath +.settings/ + diff --git a/AUTHORS b/AUTHORS index 0af9b46..f3417de 100755 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,7 @@ -current development starting from 2011: +Development starting from 2016/17: +https://www.bananas-playground.net/projekt/insipid/ + +Development starting from 2011 to 2013: https://github.com/jumpin-banana/insipid creator: diff --git a/ChangeLog b/ChangeLog index b44685f..a135772 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +verion 2.0 (tba) + + version 1.6 (tba) * code fixes * new options in htaccess file diff --git a/README b/README index e59f23f..8193df5 100755 --- a/README +++ b/README @@ -1,42 +1,3 @@ Insipid is a web-based bookmark manager similar to the Delicious service. - -This is a heavily modified version of insipid createted by Luke Reeves. -This release was done by https://github.com/jumpin-banana/insipid - -Rename the insipid-config.cgi.example to insipid-config.cgi and edit it, -replacing the example values with those that match your system. - -Create a user and password for the database if you don't have one assigned -to you by your adiministrator or ISP. Doing this is beyond the scope of this -readme file - refer to the server documentation for more help. - -Rename the htaccess file to .htaccess and add a "RewriteBase" clause to the -top, such as: - - RewriteBase /~luke/ - -You can optionally add "insipid.cgi" to the list of files in the -DirectoryIndex line (for example, "DirectoryIndex index.cgi insipid.cgi"). - -The non-standard Perl packages required for use (with their Debian package -names) are: - - Module Debian Package - -------------- ------------------------------------ - Date::Format libtimedate-perl - XML::Parser libxml-parser-perl - XML::Writer libxml-writer-perl - -Once the configuration is finished, access the insipid.cgi through your -web browser at the URL you've configured and the database should be -automatically configured. - -If you ever upgrade Insipid, the database schema will be automatically -updated upon access. - -Using Screenshots -If you plan to use the screenshot feature you need to install phantomjs -http://phantomjs.org/ -and set the path to it in the configuration file. - +https://www.bananas-playground.net/projekt/insipid/ \ No newline at end of file diff --git a/TODO b/TODO index 937b8c1..330cfec 100755 --- a/TODO +++ b/TODO @@ -1,11 +1,2 @@ TODO / Feature list ========================================================================== -- Optionally use LWP to automatically import Delicious marks -- Pageable snapshot list -- An inbox of links that people submit, either through a public interface - or XML-RPC (Rest of course) -- A way to publish links to friends via their exposed RPC interface -- Add a new column to the bookmark table for a "Via" field (which can be - filled in automatically when a mark is pushed and accepted) -- Add - (subtractive) filtering -- Share the iteration code between export and display diff --git a/VERSION b/VERSION index c239c60..cd5ac03 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5 +2.0 diff --git a/ff_ext/FF_EXT_ChangeLog b/ff_ext/FF_EXT_ChangeLog deleted file mode 100644 index 85849ea..0000000 --- a/ff_ext/FF_EXT_ChangeLog +++ /dev/null @@ -1,30 +0,0 @@ -- October 11, 2011 : -* Upped browsers maxVersion to 15.0 in both /ff_ext/inspd@danny/install.rdf and /ff_ext/utils/inspd_update.xml -=========================== -- November 26, 2010 : -* Added FF_EXT_ChangeLog file to keep track of changes in FireFox extension -=========================== -- August 30, 2010 : -* Fixed a bug in tags suggestion where backslashes were not properly escaped. -=========================== -- August 19, 2010 : -* Fixed "save to Insipid" links on del.icio.us pages. [2] -=========================== -- August 06, 2010 : -* Fixed "save to Insipid" links on del.icio.us pages. -=========================== -- April 11, 2010 : -* Fixed a bug in tags suggestion where double quotes were not properly escaped. -=========================== -- April 05, 2010 : -* Cleaned up some old and redundant js lines. -* Fixed a bug in tags suggestion where long tags were mistakenly truncated. -=========================== -- March 30, 2010 : -* Fixed a bug when getting popular tags. -* Wider popup post page. (800px) -* Created an "archives" directory for saving xpi files. -* Upped the version to 0.0.2.9 (updated install.rdf and inspd_update.xml) -=========================== -- August 19, 2009 : -* Initial import. diff --git a/ff_ext/README b/ff_ext/README deleted file mode 100644 index 2633a5e..0000000 --- a/ff_ext/README +++ /dev/null @@ -1 +0,0 @@ -This extension is not working at the moment diff --git a/ff_ext/archives/insipid_firefox_flock_extension_0.0.2.9.xpi b/ff_ext/archives/insipid_firefox_flock_extension_0.0.2.9.xpi deleted file mode 100644 index f60ecd6..0000000 Binary files a/ff_ext/archives/insipid_firefox_flock_extension_0.0.2.9.xpi and /dev/null differ diff --git a/ff_ext/archives/latest.xpi b/ff_ext/archives/latest.xpi deleted file mode 100644 index f60ecd6..0000000 Binary files a/ff_ext/archives/latest.xpi and /dev/null differ diff --git a/ff_ext/inspd@danny/chrome.manifest b/ff_ext/inspd@danny/chrome.manifest deleted file mode 100644 index 1ec8b50..0000000 --- a/ff_ext/inspd@danny/chrome.manifest +++ /dev/null @@ -1,8 +0,0 @@ -content inspd chrome/inspd/content/ -content inspd chrome/inspd/content/ contentaccessible=yes - -overlay chrome://browser/content/browser.xul chrome://inspd/content/inspdoverlay.xul - -skin inspd classic/1.0 chrome/inspd/skin/classic/ -style chrome://browser/content/browser.xul chrome://inspd/skin/inspd.css -style chrome://global/content/customizeToolbar.xul chrome://inspd/skin/inspd.css \ No newline at end of file diff --git a/ff_ext/inspd@danny/chrome/inspd/content/inc/globals.js b/ff_ext/inspd@danny/chrome/inspd/content/inc/globals.js deleted file mode 100644 index a250a8c..0000000 --- a/ff_ext/inspd@danny/chrome/inspd/content/inc/globals.js +++ /dev/null @@ -1,779 +0,0 @@ -function $id(elid,doc){if(!doc){doc=document;} return doc.getElementById(elid); } -if(typeof(Insipid) == 'undefined') var Insipid = {}; -var Inspd_gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper); -var prefs_getBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); -var prefs_getservice = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); -var $prefs = { - - set : function(pref_name, pref_value) { - var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); - str.data = $utils.trim(pref_value); - prefs_getBranch.setComplexValue('extensions.inspd.'+pref_name, Components.interfaces.nsISupportsString, str); - }, - - set2 : function(pref_name, pref_value) { - var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); - str.data = $utils.trim(pref_value); - prefs_getBranch.setComplexValue(pref_name, Components.interfaces.nsISupportsString, str); - }, - - - - get : function(pref_name){ - try{ - return prefs_getBranch.getComplexValue('extensions.inspd.'+pref_name,Components.interfaces.nsISupportsString).data; - } - catch(e){ return false;} - }, - - remove : function(pref_name){ - try{prefs_getBranch.clearUserPref('extensions.inspd.'+pref_name) - }catch(e){} - }, - - remove_all : function(pref_name){ - try{prefs_getBranch.deleteBranch('extensions.inspd.'+pref_name,'') - }catch(e){} - }, - - - branch : function(pref_name){ - var serialBranch = prefs_getservice.getBranch('extensions.inspd.'+pref_name+'.'); - return serialBranch.getChildList("",{}); - } -} - - -var $ajax = { - - get : function(url,func){ - var http_request = new XMLHttpRequest(); - http_request.onreadystatechange = function() { func(http_request); }; - http_request.open('GET', url, true); - http_request.setRequestHeader("Connection", "close"); - http_request.setRequestHeader("Keep-Alive", ""); - http_request.send(null); - } - -} - - -var $effects = { - - toggleFade: function(elid) { - if ($id(elid).style.display == 'none'){ - this.fadeIn(elid); - }else{ - this.fadeOut(elid); - } - }, - - toggleShow: function(elid) { - if ($id(elid).style.display == 'none'){ - $id(elid).style.display = 'block'; - } - else{ - $id(elid).style.display = 'none'; - } - }, - - - - fadeOut : function(elid) { - var opacs = ["0",".1",".2",".3",".4",".5",".6",".7",".8",".9","1"]; - opacs.reverse(); - for (var i = 0; i < 11; i++) { - setTimeout('$id(\''+elid+'\').style.opacity = "'+opacs[i]+'";', i * 40); - } - setTimeout('$id(\''+elid+'\').style.display = "none";', i * 40); - }, - - - fadeIn : function(elid) { - var opacs = [".1",".2",".3",".4",".5",".6",".7",".8",".9","1"]; - $id(elid).style.opacity = '0'; - $id(elid).style.display = 'block'; - for (var i = 0; i < 10; i++) { - setTimeout('$id(\''+elid+'\').style.opacity = "'+opacs[i]+'";', i * 40); - } - - }, - - hide : function(elid,delay){ - setTimeout('$effects.fadeOut(\''+elid+'\');',parseInt(delay)*1000) - }, - - initializedrag : function(e,main_id,drag_id){ - var crossobj=$id(main_id) ; - var firedobj= e.target ; - var topelement= "body" ; - while (firedobj.tagName!=topelement.toUpperCase() && firedobj.id!=drag_id){ - firedobj=firedobj.parentNode ; - } - - if (firedobj.id==drag_id){ - var offsetx= e.clientX ; - var offsety= e.clientY ; - - var tempx=parseInt(crossobj.style.left) ; - var tempy=parseInt(crossobj.style.top) ; - - dragapproved=true ; - document.onmousemove=(function(e){ - if (dragapproved){ - crossobj.style.left=tempx+e.clientX-offsetx+"px" - crossobj.style.top=tempy+e.clientY-offsety+"px" - return false - } - return false; - }) - } - - }, - - pos2Anchor : function(obj,e,commentbox) { - - - var tempX = 0; - var tempY = 0; - var offset = 5; - - obj = $id(obj); - - tempX = e.pageX; - tempY = e.pageY; - if (tempX < 0){tempX = 0} - if (tempY < 0){tempY = 0} - - - - obj.style.top = (tempY + offset) + 'px'; - if (commentbox == true){ - obj.style.left = ((tempX + offset)+0) + 'px'; - } - else { - obj.style.left = ((tempX + offset)-155) + 'px'; - } - - - }, - - show : function(obj,show) { - - $id(obj).style.display = show ? 'block' : 'none'; - //obj.style.visibility = show ? 'visible' : 'hidden'; - }, - - - getAnchorPos: function(anchorname) { - // This function will return an Object with x and y properties - var useWindow=false; - var coordinates=new Object(); - var x=0,y=0; - var use_gebi=false, use_css=false, use_layers=false; - if (document.getElementById) { use_gebi=true; } - else if (document.all) { use_css=true; } - else if (document.layers) { use_layers=true; } - if (use_gebi && document.all) { - x=this.AnchorPosition_getPageOffsetLeft(document.all[anchorname]); - y=this.AnchorPosition_getPageOffsetTop(document.all[anchorname]); - } - else if (use_gebi) { - var o=document.getElementById(anchorname); - x=this.AnchorPosition_getPageOffsetLeft(o); - y=this.AnchorPosition_getPageOffsetTop(o); - } - else if (use_css) { - x=this.AnchorPosition_getPageOffsetLeft(document.all[anchorname]); - y=this.AnchorPosition_getPageOffsetTop(document.all[anchorname]); - } - else if (use_layers) { - var found=0; - for (var i=0; i'; - $id('nav').style.display= 'none'; - return headertxt ; - } - }, - - remove_all : function(){ - if (confirm('Are you sure you want to delete all your stars?')){ - $prefs.set('stars.list',''); - document.location.href = Inspd_JSON_HOME_PAGE ; - } - else { - return false; - } - return false; - } - - - - - - - -} - -var $conditions = { - - page_with_qs_tags : function() { - if ($utils.qs('tag') && $utils.qs('tag').split('+').length < 2){ - return true ; - } - else { - return false ; - } - }, - gate : function(){ - if (!document.location.href.match(Inspd_JSON_BOOKMARKS_PAGE) && $utils.qs('tag')){ - document.location.href = Inspd_JSON_BOOKMARKS_PAGE+'?tag='+$utils.qs('tag')+'' ; - } - - else if (!document.location.href.match(Inspd_JSON_ALLITEMS_PAGE) && $utils.qs('q')){ - document.location.href = Inspd_JSON_ALLITEMS_PAGE+'?q='+$utils.qs('q')+'' ; - } - else if (document.location.href.match(Inspd_JSON_HOME_PAGE) && $utils.qs('tag')){ - document.location.href = Inspd_JSON_BOOKMARKS_PAGE+'?tag='+$utils.qs('tag')+'' ; - } - else if (document.location.href.match(Inspd_JSON_HOME_PAGE) && $utils.qs('q')){ - document.location.href = Inspd_JSON_ALLITEMS_PAGE+'?q='+$utils.qs('q')+'' ; - } - else if (document.location.href.match(Inspd_JSON_ALLITEMS_PAGE) && $utils.qs('q') == ''){ - document.location.href = Inspd_JSON_HOME_PAGE ; - } - else if (document.location.href.match(Inspd_JSON_BOOKMARKS_PAGE) && $utils.qs('tag') == ''){ - document.location.href = Inspd_JSON_HOME_PAGE ; - } - }, - - getProtocol : function(url,protocol_name){ - if(url.split(':')[0] == protocol_name){ - return true ; - } - else{ - return false; - } - - - } - - - - -} - - -var $delpage = { - - draw_postToInsipid : function(doc){ - var posts = this.getNodes("//div[@class='data']//h4", doc,doc); - for (var i = 0, k = posts.snapshotLength ; i < k ; i++) { - var row = posts.snapshotItem(i) ; - var url , title , tags, user ; - var extended = ''; - var metaNode = null; - var tagsNode = null ; - var original_save_link_href = row.getElementsByTagName('a')[1].getAttribute('href'); - if(original_save_link_href.match(/^\/save;_y(.*)\?/)){ - original_save_link_href = original_save_link_href.replace(/^\/save;_y(.*)\?/,$prefs.get('defurl')+'?op=add_bookmark&'); - } - else{ - original_save_link_href = original_save_link_href.replace(/^\/save\?/,$prefs.get('defurl')+'?op=add_bookmark&'); - } - original_save_link_href = original_save_link_href.replace(/jump=(.*)original_user=/,'copy_user='); - original_save_link_href = original_save_link_href.replace(/%20/g,'+'); - var new_save_link_href = original_save_link_href ; - row.innerHTML += ' SAVE TO INSIPID'; - } - - }, - - getNodes: function(what, where, doc) { - return doc.evaluate(what, where, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); - } - -} - -var $alt_Post = { - - trigger : function(doc){ - //$utils.appendFavIcon('chrome://inspd/content/v2/json/images/inspd_icon7_posttoinsipid_icon_1616.ico',doc); - $utils.appendcssfile(''+Inspd_BASE_ALTPOST_URL+'altpost.css',doc); - $utils.appendjsHTML(''+$alt_Post.write_jsoptions()+'',doc); - - var title_tmp = doc.evaluate("//div[@class='title']",doc,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0).innerHTML ; - doc.evaluate("//div[@class='title']",doc,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0).innerHTML = 'Post to '+title_tmp+'.  With tag autocompletion.'; - - doc.evaluate("//div[@class='search']",doc,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0).innerHTML = ''; - - doc.forms[0].getElementsByTagName('input')[1].setAttribute('value',(''+(''+doc.forms[0].getElementsByTagName('input')[1].value+'').replace(//g,'>')); - - if (doc.evaluate("//span[@class='formtext']",doc,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0).innerHTML.match('already bookmarked')){ - //'this is an edit' - var linkdelete = ''+$prefs.get('defurl')+'?op=delete_bookmark&id=\'+document.forms[0].id.value+\''; - doc.forms[0].innerHTML += '   » delete this bookmark'; - } - else{ - doc.evaluate("//span[@class='formtext']",doc,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0).innerHTML ='URL (new bookmark):'; - - } - - doc.forms[0].innerHTML +='
'+ - '
'+ - '
    '+ - '
  • '+ - '
  • '+ - '
  • '+ - '
  • '+ - '
  • '+ - '
  • '+ - '
'+ - ''; - - $utils.appendjs('chrome://inspd/content/inc/vars.js',doc) - $utils.appendjs('chrome://inspd/content/inc/md5.js',doc) - $alt_Post.setInitialUI(doc); - //$utils.appendjs(''+Inspd_BASE_ALTPOST_URL+'altpost_trigger.js',doc) - - }, - - write_jsoptions : function(){ - - var jstxt = 'window.focus();var tagRec = [];var tagPop = [];var tagPop2 = []; var tagPop3 = []; var tagFor = [];var copyuser = "" ; var copytags = [];'; - - $utils.get_deliciousUser() ? jstxt +='var Inspd_delicious_username=\''+$utils.get_deliciousUser()+'\';' : jstxt+=''; - return jstxt ; - }, - - setInitialUI : function(doc){ - var url = doc.getElementsByTagName('input')[0].getAttribute('value') ; - if($prefs.get('delintegratecommontags') != '0' && !url.match(''+$prefs.get('defurl')+'') && !url.match('^chrome|about|color\\:') && url.match('^http||https\\://') && !url.match('^.*\\://(localhost|127.0.0.|192.168.0.|10.0.0.)') ){ - doc.evaluate("//span[@class='poptags_msg']",doc,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0).innerHTML += 'getting popular tags for this url from del.icio.us ....'; - - $utils.appendjsHTML('Inspd_delintegrate_commontags = 1;',doc); - $alt_Post.GetPopTagsFromDeliciousChooser(doc,''+$prefs.get('delintegratecommontags')+''); - - - } - else{ - $utils.appendjsHTML('Inspd_delintegrate_commontags = 0;',doc); - $utils.appendjs(''+Inspd_BASE_ALTPOST_URL+'altpost_trigger.js',doc) ; - } - }, - - - - GetPopTagsFromDeliciousPersonal : function(doc){ - //var urlDeliciousPersonal = 'http://del.icio.us/'+$utils.get_deliciousUser()+'?v=4&noui&jump=close&url='+doc.getElementsByTagName('input')[0].getAttribute('value')+''; - var urlDeliciousPersonal = 'http://feeds.delicious.com/v2/json/tags/'+$utils.get_deliciousUser() ; - - - - var http_requestDeliciousPersonal = new XMLHttpRequest(); - http_requestDeliciousPersonal.onreadystatechange = function() { - if (http_requestDeliciousPersonal.readyState == 4) { - try{ - if (http_requestDeliciousPersonal.status == 200) { - //if(http_requestDeliciousPersonal.responseText.match('tagPop = \\[.*\\]') != 'tagPop = []'){ - //$utils.appendjsHTML('Inspd_delintegrate_commontags_found = 1;'+(''+http_requestDeliciousPersonal.responseText.match('var tagPop = \\[.*\\]')+'').toLowerCase()+';tagPop = tagpop;',doc) ; - var tags_txt = http_requestDeliciousPersonal.responseText ; - tags_txt = tags_txt.replace(/\{|\}|\:[0-9]{1}|\:[0-9]{2}|\:[0-9]{3}|\:[0-9]{4}/g,''); - $utils.appendjsHTML('Inspd_delintegrate_commontags_found = 1; tagPop = ['+tags_txt.toLowerCase()+'];',doc) ; - //} - //else{ - //$utils.appendjsHTML('Inspd_delintegrate_commontags_found = 2;',doc); - //} - $utils.appendjs(''+Inspd_BASE_ALTPOST_URL+'altpost_trigger.js',doc) ; - } - else { - //alert(e); - $utils.appendjsHTML('Inspd_delintegrate_commontags_found = 3;',doc); - $utils.appendjs(''+Inspd_BASE_ALTPOST_URL+'altpost_trigger.js',doc) ; - } - } - catch(e){ - //alert(e); - $utils.appendjsHTML('Inspd_delintegrate_commontags_found = 3;',doc); - $utils.appendjs(''+Inspd_BASE_ALTPOST_URL+'altpost_trigger.js',doc) ; - } - } - }; - //http_requestDeliciousPersonal.overrideMimeType('text/xml'); - http_requestDeliciousPersonal.open('GET', urlDeliciousPersonal, true); - http_requestDeliciousPersonal.setRequestHeader("Connection", "close"); - http_requestDeliciousPersonal.setRequestHeader("Keep-Alive", ""); - http_requestDeliciousPersonal.send(null); - }, - - GetPopTagsFromDeliciousFetchURL : function(doc){ - //$utils.inc('chrome://inspd/content/inc/md5.js'); - var urlDeliciousURL = 'http://delicious.com/url/'+hex_md5(''+doc.getElementsByTagName('input')[0].getAttribute('value')+'')+'?settagview=cloud'; - - var http_requestDeliciousURL = new XMLHttpRequest(); - http_requestDeliciousURL.onreadystatechange = function() { - if (http_requestDeliciousURL.readyState == 4) { - try{ - if (http_requestDeliciousURL.status == 200) { - //var alphacloud_txt = (''+http_requestDeliciousURL.responseText.match(/
[\s\S]+/)+'').replace(/