slashhack-cvs Mailing List for SlashHack (Page 3)
Brought to you by:
fletch
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(57) |
Nov
|
Dec
|
|---|
|
From: Dave F. <fl...@us...> - 2004-10-21 03:05:57
|
Update of /cvsroot/slashhack/slashhack/resources/js/jslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27084/jslib Log Message: Directory /cvsroot/slashhack/slashhack/resources/js/jslib added to the repository |
|
From: Dave F. <fl...@us...> - 2004-10-21 02:43:15
|
Update of /cvsroot/slashhack/slashhack/resources/js In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21609/resources/js Modified Files: CompositeDatasource.js RDFLocal.js TransformedDatasource.js slashhack.js Log Message: Task #106456 - include each .js file once only. Index: TransformedDatasource.js =================================================================== RCS file: /cvsroot/slashhack/slashhack/resources/js/TransformedDatasource.js,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TransformedDatasource.js 18 Oct 2004 20:25:08 -0000 1.1.1.1 --- TransformedDatasource.js 21 Oct 2004 02:43:04 -0000 1.2 *************** *** 1,11 **** - - if (typeof(TRANSFORMED_DATASOURCE_LOADED)!='boolean') { - // #pragma once const TRANSFORMED_DATASOURCE_LOADED = true; - // #includes include('chrome://jslib/content/io/dirUtils.js'); --- 1,7 ---- *************** *** 13,17 **** include('chrome://jslib/content/io/file.js'); - // TransformedDatasource constructor function TransformedDatasource(srcurl, xslurl, dsn) { --- 9,12 ---- Index: slashhack.js =================================================================== RCS file: /cvsroot/slashhack/slashhack/resources/js/slashhack.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** slashhack.js 20 Oct 2004 03:59:11 -0000 1.2 --- slashhack.js 21 Oct 2004 02:43:04 -0000 1.3 *************** *** 1,323 **** ! include('chrome://slashhack/content/resources/js/TransformedDatasource.js'); ! include('chrome://slashhack/content/resources/js/CompositeDatasource.js'); ! include('chrome://slashhack/content/resources/js/RDFLocal.js'); ! include('chrome://jslib/content/rdf/rdf.js'); ! var stories_datasource = newCompositeDatasource(); ! var stories_rdf = new RDFLocal(stories_datasource); ! var torrents_rdf = new RDF('urn:slashhack:torrents'); ! var torrents = torrents_rdf.addRootSeq('urn:slashhack:torrents'); ! var index_datasource = null; ! window.addEventListener( ! 'load', ! function(evt) { ! // create the homepage datasource ! if (evt.target != window.document) return; // something else loaded ! index_datasource = new TransformedDatasource( ! 'http://slashdot.org/', ! 'chrome://slashhack/content/resources/xsl/index.xsl', ! 'rdf:slashdot' ! ); ! //index_datasource.numsubloads = 0; ! // hook up index_datasource datasource to `slashdot-menupopup` ! index_datasource.addManagedTemplateRoot( ! window.document.getElementById('slashdot-menupopup') ! ); ! index_datasource.addManagedTemplateRoot( ! window.document.getElementById('slashdot-articles') ! ); ! // notify user when done ! index_datasource.addLoadObserver(function(index_datasource) { ! setStatus('Done.'); ! }); ! // load the index_datasource datasource ! index_datasource.load(); ! }, ! true ! ); ! function __remove__(removers) { ! for (var i=0; i<removers.length; i++) { ! var p = removers[i].parentNode; ! if (p) p.removeChild(removers[i]); } - } ! function __fixup__(node) { ! ! var removers = new Array(); ! ! var nn = node.nodeName.toLowerCase(); ! ! if (nn == 'body') { ! node.setAttribute( ! 'bgcolor', '#eeeeee' ! ); ! } ! else if (nn == 'td') { ! var bg = node.getAttribute('background'); ! if (bg && bg.length) node.setAttribute( ! 'background', 'http:' + bg ! ); ! } ! else if (nn == 'img') { ! node.setAttribute( ! 'src', 'http:' + node.getAttribute('src') ! ); ! } ! else if (nn == 'link') { ! node.setAttribute( ! 'href', 'http:' + node.getAttribute('href') ! ); ! } ! else if (nn == 'noscript') { ! removers.push(node); ! } ! else if (nn == 'a') { ! var ref = node.getAttribute('href'); ! if(ref) { ! if (ref.indexOf('//')==0) ref = 'http:' + ref; node.setAttribute( ! 'href', 'javascript:document.launchie("' + ref + '");' ); node.setAttribute( ! 'onmouseover', ! node.getAttribute('onmouseover') + ! '; document.setStatus("' + ! ref + ! '")' ); } ! node.setAttribute( ! 'style', ! 'text-decoration: underline; ' + node.getAttribute('style') ! ); ! node.setAttribute( ! 'onmouseout', ! node.getAttribute('onmouseout') + ! '; document.setStatus("Done.")' ! ); ! } ! ! var k = node.childNodes; ! var l = k.length; ! for (var i=0; i<l; i++) { ! removers = removers.concat(__fixup__(k.item(i))); } - return removers; - } ! function __fixup(node) { ! var removers = __fixup__(node); ! __remove__(removers); ! } ! var __launchie_cache = []; ! function launchie(url) { ! if (__launchie_cache[url]) { ! var o = __launchie_cache[url]; ! o[2].contentDocument.location.reload(); ! } ! else { ! var t = window.document.createElement('tab'); ! t.setAttribute('label', url); ! t.setAttribute('maxwidth', '120'); ! t.setAttribute('crop', 'end'); ! var p = window.document.createElement('tabpanel'); ! var i = window.document.createElement('iframe'); ! i.setAttribute('src', url); ! p.setAttribute('flex', '1'); ! i.setAttribute('flex', '1'); ! p.appendChild(i); ! window.addEventListener( ! 'load', ! function(evt) { ! //alert('evt.target' + evt.target); ! //alert('i.contentDocument' + i.contentDocument); ! if (evt.target == i.contentDocument) { ! t.label = evt.target.title; ! } ! }, ! true ! ); ! var slashdot_tabs = window.document.getElementById('slashdot-tabs'); ! slashdot_tabs.appendChild(t); ! var slashdot_tabpanels = window.document.getElementById('slashdot-tabpanels'); ! slashdot_tabpanels.appendChild(p); ! var o = [ t, p, i ]; ! __launchie_cache[url] = o; } - var slashdot_tabbox = window.document.getElementById('slashdot-tabbox'); - slashdot_tabbox.selectedTab = o[0]; - slashdot_tabbox.selectedPanel = o[1]; - } ! function loadComments(composite_ds, url) { ! ! // user notification ! setStatus('Loading: ' + url); - //alert ('load comments: ' + url); - var commentsds = new TransformedDatasource( - url, - 'chrome://slashhack/content/resources/xsl/comments.xsl', - 'urn:slashdot:comments:' + url - ); - composite_ds.AddDataSource(commentsds.mDS); - commentsds.addLoadObserver(function(commentsds) { - //dump('comments HTML: \n'); commentsds.dumpHTML(); - var comment_viewer = window.document.getElementById('comment-viewer'); - comment_viewer.database.AddDataSource(commentsds.getDS()); - comment_viewer.builder.refresh(); - comment_viewer.builder.rebuild(); // user notification ! setStatus('Done.'); ! }); ! commentsds.mXSLTProcessor.setParameter(null, 'source', url); ! commentsds.load(); ! } - function commentViewerClick() { - var comment_viewer = window.document.getElementById('comment-viewer'); - var selected_comment = comment_viewer.contentView.getItemAtIndex( - comment_viewer.currentIndex - ); - var about = selected_comment.getAttribute('about'); - var rdf = new RDFLocal(comment_viewer.database); - var n = rdf.getNode(about); - var html_code = n.getAttribute('http://slashdot.org/slashhack#post'); - var comment_reader = window.document.getElementById('comment-reader'); - comment_reader.contentDocument.open(); - comment_reader.contentDocument.write(html_code); - comment_reader.contentDocument.launchie = launchie; - comment_reader.contentDocument.setStatus = setStatus; - __fixup(comment_reader.contentDocument.documentElement); - comment_reader.contentDocument.close(); - setStatus(n.getAttribute('http://slashdot.org/slashhack#subject')); - } - function loadStory(url) { ! // mode = don't load comments ! if (url.indexOf('?')>0) url = url + '&mode=nocomment'; ! else url = url + '?mode=nocomment'; - // user notification - setStatus('Loading: ' + url); ! // create a data source ! var storyds = new TransformedDatasource( ! url, ! 'chrome://slashhack/content/resources/xsl/story.xsl', ! 'urn:slashdot:stories:' + url ! ); ! stories_datasource.AddDataSource(storyds.mDS); ! storyds.addLoadObserver(function(storyds) { ! ! var url = storyds.getSrcURL(); ! // get the story HTML code from RDF ! var storynode = stories_rdf.getNode(url); ! var storycode = storynode.getAttribute( ! 'http://slashdot.org/slashhack#story' ! ); ! // write the HTML to the 'story-reader' iframe ! var story_reader = window.document.getElementById('story-reader'); ! story_reader.contentDocument.open(); ! story_reader.contentDocument.write(storycode); ! story_reader.contentDocument.launchie = launchie; ! story_reader.contentDocument.setStatus = setStatus; ! __fixup(story_reader.contentDocument.documentElement); ! story_reader.contentDocument.close(); ! var related_menu = window.document.getElementById('related-menupopup'); ! related_menu.datasources = storyds.getDSN(); ! // load comments... ! ! // get form/@action and input[@name=sid]/@value ! var formnode = stories_rdf.getNode(url + '#form'); ! var act = formnode.getAttribute( ! 'http://slashdot.org/slashhack#action' ! ); ! var sid = formnode.getAttribute( ! 'http://slashdot.org/slashhack#sid' ); ! url = 'http:'+act+'?sid='+sid+'&threshold=-1&mode=flat&commentsort=4'; ! // comments are a multi-page composite ! var comments_composite = newCompositeDatasource(); ! loadComments(comments_composite, url); ! // enable the related menu ! window.document.getElementById('related-menu').setAttribute( ! 'disabled', '' ! ); ! // user notification ! //setStatus('Done.'); ! }); ! storyds.mXSLTProcessor.setParameter(null, 'source', url); ! storyds.load(); ! } ! function storyClick(url) { ! // XUL inserts an extra space in url. remove it ! url = url.substring(0, url.length-1); ! // clear the comments datasource ! var comment_viewer = window.document.getElementById('comment-viewer'); ! var dss = comment_viewer.database.GetDataSources(); ! var remove = new Array(); ! while (dss.hasMoreElements()) remove.push(dss.getNext()); ! for (var i=0; i<remove.length; i++) ! comment_viewer.database.RemoveDataSource(remove[i]); ! try { ! comment_viewer.builder.refresh(); ! comment_viewer.builder.rebuild(); } - catch (e) { ; } - - // clear the comment reader - var comment_reader = window.document.getElementById('comment-reader'); - comment_reader.contentDocument.location.href = 'about:blank'; - // load it. - loadStory(url); - } ! function setStatus(msg) { ! var status = window.document.getElementById('status-label'); ! status.value = msg; ! } ! // make this configurable ! function reloadIndex() { ! index_datasource.reload(); window.setTimeout(reloadIndex, 120000); - } - window.setTimeout(reloadIndex, 120000); --- 1,334 ---- + if (typeof(SLASHHACK_LOADED)!='boolean') { + // #pragma once + const SLASHHACK_LOADED = true; ! include('chrome://slashhack/content/resources/js/TransformedDatasource.js'); ! include('chrome://slashhack/content/resources/js/CompositeDatasource.js'); ! include('chrome://slashhack/content/resources/js/RDFLocal.js'); ! include('chrome://jslib/content/rdf/rdf.js'); ! var stories_datasource = newCompositeDatasource(); ! var stories_rdf = new RDFLocal(stories_datasource); ! var torrents_rdf = new RDF('urn:slashhack:torrents'); ! var torrents = torrents_rdf.addRootSeq('urn:slashhack:torrents'); ! var index_datasource = null; ! window.addEventListener( ! 'load', ! function(evt) { ! // create the homepage datasource ! if (evt.target != window.document) return; // something else loaded ! index_datasource = new TransformedDatasource( ! 'http://slashdot.org/', ! 'chrome://slashhack/content/resources/xsl/index.xsl', ! 'rdf:slashdot' ! ); ! //index_datasource.numsubloads = 0; ! // hook up index_datasource datasource to `slashdot-menupopup` ! index_datasource.addManagedTemplateRoot( ! window.document.getElementById('slashdot-menupopup') ! ); ! index_datasource.addManagedTemplateRoot( ! window.document.getElementById('slashdot-articles') ! ); ! // notify user when done ! index_datasource.addLoadObserver(function(index_datasource) { ! setStatus('Done.'); ! }); ! // load the index_datasource datasource ! index_datasource.load(); ! }, ! true ! ); ! function __remove__(removers) { ! for (var i=0; i<removers.length; i++) { ! var p = removers[i].parentNode; ! if (p) p.removeChild(removers[i]); ! } } ! function __fixup__(node) { ! ! var removers = new Array(); ! ! var nn = node.nodeName.toLowerCase(); ! ! if (nn == 'body') { node.setAttribute( ! 'bgcolor', '#eeeeee' ); + } + else if (nn == 'td') { + var bg = node.getAttribute('background'); + if (bg && bg.length) node.setAttribute( + 'background', 'http:' + bg + ); + } + else if (nn == 'img') { node.setAttribute( ! 'src', 'http:' + node.getAttribute('src') ); } ! else if (nn == 'link') { ! node.setAttribute( ! 'href', 'http:' + node.getAttribute('href') ! ); ! } ! else if (nn == 'noscript') { ! removers.push(node); ! } ! else if (nn == 'a') { ! var ref = node.getAttribute('href'); ! if(ref) { ! if (ref.indexOf('//')==0) ref = 'http:' + ref; ! node.setAttribute( ! 'href', 'javascript:document.launchie("' + ref + '");' ! ); ! node.setAttribute( ! 'onmouseover', ! node.getAttribute('onmouseover') + ! '; document.setStatus("' + ! ref + ! '")' ! ); ! } ! node.setAttribute( ! 'style', ! 'text-decoration: underline; ' + node.getAttribute('style') ! ); ! node.setAttribute( ! 'onmouseout', ! node.getAttribute('onmouseout') + ! '; document.setStatus("Done.")' ! ); ! } ! ! var k = node.childNodes; ! var l = k.length; ! for (var i=0; i<l; i++) { ! removers = removers.concat(__fixup__(k.item(i))); ! } ! return removers; } ! function __fixup(node) { ! var removers = __fixup__(node); ! __remove__(removers); ! } ! var __launchie_cache = []; ! function launchie(url) { ! if (__launchie_cache[url]) { ! var o = __launchie_cache[url]; ! o[2].contentDocument.location.reload(); ! } ! else { ! var t = window.document.createElement('tab'); ! t.setAttribute('label', url); ! t.setAttribute('maxwidth', '120'); ! t.setAttribute('crop', 'end'); ! var p = window.document.createElement('tabpanel'); ! var i = window.document.createElement('iframe'); ! i.setAttribute('src', url); ! p.setAttribute('flex', '1'); ! i.setAttribute('flex', '1'); ! p.appendChild(i); ! window.addEventListener( ! 'load', ! function(evt) { ! //alert('evt.target' + evt.target); ! //alert('i.contentDocument' + i.contentDocument); ! if (evt.target == i.contentDocument) { ! t.label = evt.target.title; ! } ! }, ! true ! ); ! var slashdot_tabs = window.document.getElementById('slashdot-tabs'); ! slashdot_tabs.appendChild(t); ! var slashdot_tabpanels = window.document.getElementById('slashdot-tabpanels'); ! slashdot_tabpanels.appendChild(p); ! var o = [ t, p, i ]; ! __launchie_cache[url] = o; ! } ! var slashdot_tabbox = window.document.getElementById('slashdot-tabbox'); ! slashdot_tabbox.selectedTab = o[0]; ! slashdot_tabbox.selectedPanel = o[1]; } ! function loadComments(composite_ds, url) { // user notification ! setStatus('Loading: ' + url); + //alert ('load comments: ' + url); + var commentsds = new TransformedDatasource( + url, + 'chrome://slashhack/content/resources/xsl/comments.xsl', + 'urn:slashdot:comments:' + url + ); + composite_ds.AddDataSource(commentsds.mDS); + commentsds.addLoadObserver(function(commentsds) { + //dump('comments HTML: \n'); commentsds.dumpHTML(); + var comment_viewer = window.document.getElementById('comment-viewer'); + comment_viewer.database.AddDataSource(commentsds.getDS()); + comment_viewer.builder.refresh(); + comment_viewer.builder.rebuild(); + // user notification + setStatus('Done.'); + }); + commentsds.mXSLTProcessor.setParameter(null, 'source', url); + commentsds.load(); + } + function commentViewerClick() { + var comment_viewer = window.document.getElementById('comment-viewer'); + var selected_comment = comment_viewer.contentView.getItemAtIndex( + comment_viewer.currentIndex + ); + var about = selected_comment.getAttribute('about'); + var rdf = new RDFLocal(comment_viewer.database); + var n = rdf.getNode(about); + var html_code = n.getAttribute('http://slashdot.org/slashhack#post'); + var comment_reader = window.document.getElementById('comment-reader'); + comment_reader.contentDocument.open(); + comment_reader.contentDocument.write(html_code); + comment_reader.contentDocument.launchie = launchie; + comment_reader.contentDocument.setStatus = setStatus; + __fixup(comment_reader.contentDocument.documentElement); + comment_reader.contentDocument.close(); + setStatus(n.getAttribute('http://slashdot.org/slashhack#subject')); + } ! function commentViewerClickColumn(colname) { ! var column = window.document.getElementById(colname); ! var comment_viewer = window.document.getElementById('comment-viewer'); ! alert('comment_viewer.contentView: ' + comment_viewer.contentView); ! comment_viewer.contentView.sort(column); ! } ! function loadStory(url) { ! // mode = don't load comments ! if (url.indexOf('?')>0) url = url + '&mode=nocomment'; ! else url = url + '?mode=nocomment'; ! // user notification ! setStatus('Loading: ' + url); ! // create a data source ! var storyds = new TransformedDatasource( ! url, ! 'chrome://slashhack/content/resources/xsl/story.xsl', ! 'urn:slashdot:stories:' + url ); + stories_datasource.AddDataSource(storyds.mDS); + storyds.addLoadObserver(function(storyds) { ! var url = storyds.getSrcURL(); ! // get the story HTML code from RDF ! var storynode = stories_rdf.getNode(url); ! var storycode = storynode.getAttribute( ! 'http://slashdot.org/slashhack#story' ! ); ! // write the HTML to the 'story-reader' iframe ! var story_reader = window.document.getElementById('story-reader'); ! story_reader.contentDocument.open(); ! story_reader.contentDocument.write(storycode); ! story_reader.contentDocument.launchie = launchie; ! story_reader.contentDocument.setStatus = setStatus; ! __fixup(story_reader.contentDocument.documentElement); ! story_reader.contentDocument.close(); ! var related_menu = window.document.getElementById('related-menupopup'); ! related_menu.datasources = storyds.getDSN(); ! // load comments... + // get form/@action and input[@name=sid]/@value + var formnode = stories_rdf.getNode(url + '#form'); + var act = formnode.getAttribute( + 'http://slashdot.org/slashhack#action' + ); + var sid = formnode.getAttribute( + 'http://slashdot.org/slashhack#sid' + ); ! url = 'http:'+act+'?sid='+sid+'&threshold=-1&mode=flat&commentsort=4'; ! // comments are a multi-page composite ! var comments_composite = newCompositeDatasource(); ! loadComments(comments_composite, url); ! // enable the related menu ! window.document.getElementById('related-menu').setAttribute( ! 'disabled', '' ! ); ! ! // user notification ! //setStatus('Done.'); ! }); ! storyds.mXSLTProcessor.setParameter(null, 'source', url); ! storyds.load(); } + function storyClick(url) { ! // XUL inserts an extra space in url. remove it ! url = url.substring(0, url.length-1); + // clear the comments datasource + var comment_viewer = window.document.getElementById('comment-viewer'); + var dss = comment_viewer.database.GetDataSources(); + var remove = new Array(); + while (dss.hasMoreElements()) remove.push(dss.getNext()); + for (var i=0; i<remove.length; i++) + comment_viewer.database.RemoveDataSource(remove[i]); + try { + comment_viewer.builder.refresh(); + comment_viewer.builder.rebuild(); + } + catch (e) { ; } + // clear the comment reader + var comment_reader = window.document.getElementById('comment-reader'); + comment_reader.contentDocument.location.href = 'about:blank'; ! // load it. ! loadStory(url); ! } ! ! ! function setStatus(msg) { ! var status = window.document.getElementById('status-label'); ! status.value = msg; ! } ! ! ! ! // make this configurable ! function reloadIndex() { ! index_datasource.reload(); ! window.setTimeout(reloadIndex, 120000); ! } window.setTimeout(reloadIndex, 120000); *************** *** 327,332 **** ! /* ------------------------------------------------------------ */ ! /* ------------------------------------------------------------ */ --- 338,343 ---- ! /* ------------------------------------------------------------ */ ! /* ------------------------------------------------------------ */ *************** *** 342,373 **** ! function walk_rdf(rdf) { ! dump("WALKING: '" + rdf.getSource() + "'\n"); ! var conts = rdf.getAllContainers(); ! for(var i=0; i<conts.length; i++) { ! walk_container(conts[i]); ! } ! } ! function walk_container(res) { ! var list; ! dump("Container: '" + res.getSubject() + "'\n"); ! // walk_attributes(res); ! list = res.getSubContainers(); ! for(var i=0; i<list.length; i++) { ! walk_container(list[i]); ! } ! list = res.getSubNodes(); ! for(var i=0; i<list.length; i++) { ! dump("\tnode: '" + list[i].getSubject() + "'\n"); ! walk_attributes(list[i]); ! } ! } ! function walk_attributes(node) { ! list = node.getAllAttributes(); ! for(var i=0; i<list.length; i++) { ! dump("\t\tattr: [name=" + list[i].name + "][value=" + list[i].value + "]\n"); ! } } - --- 353,384 ---- ! function walk_rdf(rdf) { ! dump("WALKING: '" + rdf.getSource() + "'\n"); ! var conts = rdf.getAllContainers(); ! for(var i=0; i<conts.length; i++) { ! walk_container(conts[i]); ! } ! } ! function walk_container(res) { ! var list; ! dump("Container: '" + res.getSubject() + "'\n"); ! // walk_attributes(res); ! list = res.getSubContainers(); ! for(var i=0; i<list.length; i++) { ! walk_container(list[i]); ! } ! list = res.getSubNodes(); ! for(var i=0; i<list.length; i++) { ! dump("\tnode: '" + list[i].getSubject() + "'\n"); ! walk_attributes(list[i]); ! } ! } ! function walk_attributes(node) { ! list = node.getAllAttributes(); ! for(var i=0; i<list.length; i++) { ! dump("\t\tattr: [name=" + list[i].name + "][value=" + list[i].value + "]\n"); ! } ! } } Index: CompositeDatasource.js =================================================================== RCS file: /cvsroot/slashhack/slashhack/resources/js/CompositeDatasource.js,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CompositeDatasource.js 18 Oct 2004 20:25:08 -0000 1.1.1.1 --- CompositeDatasource.js 21 Oct 2004 02:43:04 -0000 1.2 *************** *** 1,11 **** ! function newCompositeDatasource() { ! return Components.classes[ ! "@mozilla.org/rdf/datasource;1?name=composite-datasource" ! ].createInstance( ! Components.interfaces.nsIRDFDataSource ! ).QueryInterface( ! Components.interfaces.nsIRDFCompositeDataSource ! ); } --- 1,15 ---- + if (typeof(COMPOSITE_DATASOURCE_LOADED)!='boolean') { + // #pragma once + const COMPOSITE_DATASOURCE_LOADED = true; ! function newCompositeDatasource() { ! return Components.classes[ ! "@mozilla.org/rdf/datasource;1?name=composite-datasource" ! ].createInstance( ! Components.interfaces.nsIRDFDataSource ! ).QueryInterface( ! Components.interfaces.nsIRDFCompositeDataSource ! ); ! } } Index: RDFLocal.js =================================================================== RCS file: /cvsroot/slashhack/slashhack/resources/js/RDFLocal.js,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** RDFLocal.js 18 Oct 2004 20:25:08 -0000 1.1.1.1 --- RDFLocal.js 21 Oct 2004 02:43:04 -0000 1.2 *************** *** 1,22 **** ! include('chrome://jslib/content/rdf/rdf.js'); ! function RDFLocal(dsource) { ! this.mRDF = new RDF(null); ! this.mRDF.dsource = dsource; ! this.mRDF.loaded = true; ! this.mRDF.setValid(true); ! } ! RDFLocal.prototype.getNode = function(p) { ! return this.mRDF.getNode(p); ! } ! RDFLocal.prototype.getSource = function() { ! return this.mRDF.getSource(); ! } ! RDFLocal.prototype.getAllContainers = function() { ! return this.mRDF.getAllContainers(); } --- 1,26 ---- + if (typeof(RDF_LOCAL_LOADED)!='boolean') { ! // #pragma once ! const RDF_LOCAL_LOADED = true; + include('chrome://jslib/content/rdf/rdf.js'); ! function RDFLocal(dsource) { ! this.mRDF = new RDF(null); ! this.mRDF.dsource = dsource; ! this.mRDF.loaded = true; ! this.mRDF.setValid(true); ! } ! RDFLocal.prototype.getNode = function(p) { ! return this.mRDF.getNode(p); ! } ! RDFLocal.prototype.getSource = function() { ! return this.mRDF.getSource(); ! } ! RDFLocal.prototype.getAllContainers = function() { ! return this.mRDF.getAllContainers(); ! } } |
|
From: Dave F. <fl...@us...> - 2004-10-21 02:43:15
|
Update of /cvsroot/slashhack/slashhack/resources/xul/main-tab In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21609/resources/xul/main-tab Modified Files: index.xul Log Message: Task #106456 - include each .js file once only. Index: index.xul =================================================================== RCS file: /cvsroot/slashhack/slashhack/resources/xul/main-tab/index.xul,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** index.xul 18 Oct 2004 20:25:08 -0000 1.1.1.1 --- index.xul 21 Oct 2004 02:43:05 -0000 1.2 *************** *** 68,88 **** id='comment-viewer' datasources='rdf:null' - enableColumnDrag='true' ref='urn:slashhack:comments' ! onselect='commentViewerClick();'> ! <treecols> <treecol ! id='subject' primary='true' label='Subject' flex='3'/> <treecol ! id='user' label='User' flex='1'/> <treecol ! id='score' label='Score' flex='1'/> </treecols> --- 68,101 ---- id='comment-viewer' datasources='rdf:null' ref='urn:slashhack:comments' ! onselect='commentViewerClick(); return true;'> ! <treecols id='comment-viewer-treecols'> <treecol ! id='comment-viewer-subject-col' primary='true' label='Subject' + class='sortDirectionIndicator' + sort='rdf:http://slashdot.org/slashhack#subject' + sortActive='true' + sortDirection='ascending' flex='3'/> <treecol ! id='comment-viewer-user-col' ! primary='false' label='User' + class='sortDirectionIndicator' + sort='rdf:http://slashdot.org/slashhack#user' + sortActive='false' + sortDirection='ascending' flex='1'/> <treecol ! id='comment-viewer-score-col' ! primary='false' label='Score' + class='sortDirectionIndicator' + sort='rdf:http://slashdot.org/slashhack#score' + sortActive='false' + sortDirection='ascending' flex='1'/> </treecols> |
|
From: Dave F. <fl...@us...> - 2004-10-20 03:59:21
|
Update of /cvsroot/slashhack/slashhack/resources/xul/menus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29911/resources/xul/menus Modified Files: index.xul Log Message: Task #106510 (Tab titles / focus) implemented. Index: index.xul =================================================================== RCS file: /cvsroot/slashhack/slashhack/resources/xul/menus/index.xul,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** index.xul 18 Oct 2004 20:25:08 -0000 1.1.1.1 --- index.xul 20 Oct 2004 03:59:12 -0000 1.2 *************** *** 90,93 **** --- 90,125 ---- </menu> + <menu label='Help' accesskey='H' id='help-menu'> + <menupopup + id='help-menupopup' + ref='urn:slashhack:torrents'> + <menuitem + label='Help' + accesskey='H' + oncommand='launchie("http://slashhack.sf.net/help/");'/> + <menuitem + label='About SlashHack' + accesskey='A' + oncommand='launchie("http://slashhack.sf.net/about/");'/> + <menuseparator/> + <menuitem + label='About Slashdot' + accesskey='S' + oncommand='launchie("http://slashdot.org/about.shtml");'/> + <menuitem + label='Slashdot Supporters' + accesskey='u' + oncommand='launchie("http://slashdot.org/supporters.shtml");'/> + <menuitem + label='Slashdot Code' + accesskey='C' + oncommand='launchie("http://slashdot.org/code.shtml");'/> + <menuitem + label='Slashdot Awards' + accesskey='w' + oncommand='launchie("http://slashdot.org/awards.shtml");'/> + </menupopup> + </menu> + </menubar> |
|
From: Dave F. <fl...@us...> - 2004-10-20 03:59:21
|
Update of /cvsroot/slashhack/slashhack/resources/js In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29911/resources/js Modified Files: slashhack.js Log Message: Task #106510 (Tab titles / focus) implemented. Index: slashhack.js =================================================================== RCS file: /cvsroot/slashhack/slashhack/resources/js/slashhack.js,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** slashhack.js 18 Oct 2004 20:25:08 -0000 1.1.1.1 --- slashhack.js 20 Oct 2004 03:59:11 -0000 1.2 *************** *** 125,143 **** } function launchie(url) { ! var t = window.document.createElement('tab'); ! t.setAttribute('label', url); ! t.setAttribute('maxwidth', '120'); ! t.setAttribute('crop', 'end'); ! var p = window.document.createElement('tabpanel'); ! var i = window.document.createElement('iframe'); ! i.setAttribute('src', url); ! p.setAttribute('flex', '1'); ! i.setAttribute('flex', '1'); ! p.appendChild(i); ! var slashdot_tabs = window.document.getElementById('slashdot-tabs'); ! var slashdot_tabpanels = window.document.getElementById('slashdot-tabpanels'); ! slashdot_tabs.appendChild(t); ! slashdot_tabpanels.appendChild(p); } --- 125,167 ---- } + + var __launchie_cache = []; function launchie(url) { ! if (__launchie_cache[url]) { ! var o = __launchie_cache[url]; ! o[2].contentDocument.location.reload(); ! } ! else { ! var t = window.document.createElement('tab'); ! t.setAttribute('label', url); ! t.setAttribute('maxwidth', '120'); ! t.setAttribute('crop', 'end'); ! var p = window.document.createElement('tabpanel'); ! var i = window.document.createElement('iframe'); ! i.setAttribute('src', url); ! p.setAttribute('flex', '1'); ! i.setAttribute('flex', '1'); ! p.appendChild(i); ! window.addEventListener( ! 'load', ! function(evt) { ! //alert('evt.target' + evt.target); ! //alert('i.contentDocument' + i.contentDocument); ! if (evt.target == i.contentDocument) { ! t.label = evt.target.title; ! } ! }, ! true ! ); ! var slashdot_tabs = window.document.getElementById('slashdot-tabs'); ! slashdot_tabs.appendChild(t); ! var slashdot_tabpanels = window.document.getElementById('slashdot-tabpanels'); ! slashdot_tabpanels.appendChild(p); ! var o = [ t, p, i ]; ! __launchie_cache[url] = o; ! } ! var slashdot_tabbox = window.document.getElementById('slashdot-tabbox'); ! slashdot_tabbox.selectedTab = o[0]; ! slashdot_tabbox.selectedPanel = o[1]; } |
|
From: Dave F. <fl...@us...> - 2004-10-20 03:17:50
|
Update of /cvsroot/slashhack/slashhack-site/about In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20279/about Modified Files: index.html Log Message: Updated help and about page titles. Index: index.html =================================================================== RCS file: /cvsroot/slashhack/slashhack-site/about/index.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.html 20 Oct 2004 02:03:32 -0000 1.2 --- index.html 20 Oct 2004 03:17:39 -0000 1.3 *************** *** 8,12 **** <tr><td> ! <table cellspacing='0' cellpadding='0' border='0' width='100%'><tr bgcolor='#006666'><td valign='top'><img src='http://slashhack.sf.net/images/slc.gif'/></td><td width='100%' style='color:#ffffff;font-family:arial,geneva,sans-serif;font-weight:bolder;font-size:32px;'>SlashHack</td><td valign='bottom' style='color:#ffffff;font-family:arial,geneva,sans-serif;font-size:10pt;font-weight:bold;'>Updated: 10/19/04</td></tr></table> <p><i><b>Note:</b> This page and the SlashHack software are --- 8,12 ---- <tr><td> ! <table cellspacing='0' cellpadding='0' border='0' width='100%'><tr bgcolor='#006666'><td valign='top'><img src='http://slashhack.sf.net/images/slc.gif'/></td><td width='100%' style='color:#ffffff;font-family:arial,geneva,sans-serif;font-weight:bolder;font-size:32px;'>about:SlashHack</td><td valign='bottom' style='color:#ffffff;font-family:arial,geneva,sans-serif;font-size:10pt;font-weight:bold;'>Updated: 10/19/04</td></tr></table> <p><i><b>Note:</b> This page and the SlashHack software are |
|
From: Dave F. <fl...@us...> - 2004-10-20 03:17:50
|
Update of /cvsroot/slashhack/slashhack-site/help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20279/help Modified Files: index.html Log Message: Updated help and about page titles. Index: index.html =================================================================== RCS file: /cvsroot/slashhack/slashhack-site/help/index.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.html 20 Oct 2004 02:03:33 -0000 1.2 --- index.html 20 Oct 2004 03:17:39 -0000 1.3 *************** *** 8,12 **** <tr><td> ! <table cellspacing='0' cellpadding='0' border='0' width='100%'><tr bgcolor='#006666'><td valign='top'><img src='http://slashhack.sf.net/images/slc.gif'/></td><td width='100%' style='color:#ffffff;font-family:arial,geneva,sans-serif;font-weight:bolder;font-size:32px;'>SlashHack</td><td valign='bottom' style='color:#ffffff;font-family:arial,geneva,sans-serif;font-size:10pt;font-weight:bold;'>Updated: 10/19/04</td></tr></table> <p><i><b>Note:</b> This page and the SlashHack software are --- 8,12 ---- <tr><td> ! <table cellspacing='0' cellpadding='0' border='0' width='100%'><tr bgcolor='#006666'><td valign='top'><img src='http://slashhack.sf.net/images/slc.gif'/></td><td width='100%' style='color:#ffffff;font-family:arial,geneva,sans-serif;font-weight:bolder;font-size:32px;'>SlashHack Help</td><td valign='bottom' style='color:#ffffff;font-family:arial,geneva,sans-serif;font-size:10pt;font-weight:bold;'>Updated: 10/19/04</td></tr></table> <p><i><b>Note:</b> This page and the SlashHack software are |