From: dannym Date: Sun, 4 Apr 2010 22:12:48 +0000 (+0200) Subject: FF_EXT: Cleaned up some old and redundant js lines - Fixed a bug in tags suggestion... X-Git-Tag: 2.1-alpha-2019-0-29~142 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=0a834f5bdf1aa142842cb83e55a9f4700e81f139;p=insipid.git FF_EXT: Cleaned up some old and redundant js lines - Fixed a bug in tags suggestion where long tags were mistakenly truncated. --- diff --git a/ff_ext/inspd@danny/chrome/inspd/content/v2/altpost/altpost_trigger.js b/ff_ext/inspd@danny/chrome/inspd/content/v2/altpost/altpost_trigger.js index db716e9..8f69d2e 100644 --- a/ff_ext/inspd@danny/chrome/inspd/content/v2/altpost/altpost_trigger.js +++ b/ff_ext/inspd@danny/chrome/inspd/content/v2/altpost/altpost_trigger.js @@ -141,31 +141,22 @@ var $altp = { scrap_tagPop : function(){ try{ var txtTagsObj = 'tagPop = ['; - //var tagsfromtbl = document.evaluate("//div[@class='alphacloud']",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0); - var tagsfromtbl = document.evaluate("//span[@class='m']",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null); // hidden_span_Inspd_delintegrate_commontags_found_1 var tagsfromtbl = document.evaluate("//span[@id='hidden_span_Inspd_delintegrate_commontags_found_1']",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null); //alert(tagsfromtbl.snapshotLength); - - // var j = tagsfromtbl.getElementsByTagName('a').length ; - //var j = tagsfromtbl.snapshotLength ; + //alert(tagsfromtbl.snapshotItem(0).innerHTML); var tagsfromtbl_all_anchors = tagsfromtbl.snapshotItem(0).getElementsByTagName('span') ; var j = tagsfromtbl_all_anchors.length ; - //alert(j); - if (j == 0 ){ var txtTagsObj = 'Inspd_delintegrate_commontags_found = 2'; return txtTagsObj; } for(var i = 0;i(.*)<\/em>/,'')).toLowerCase()+'"'; - txtTagsObj +='"'+((tagsfromtbl_all_anchors[i].innerHTML).replace(/(.*)<\/em>/,'')).toLowerCase()+'"'; + txtTagsObj +='"'+$utils.trim(tagsfromtbl_all_anchors[i].title.replace(/\((.*)\)/,'')).toLowerCase()+'"'; if (i < j-1 ){txtTagsObj += ',';} } txtTagsObj += ']';