Labs/Jetpack/JEP/22: Difference between revisions

Line 42: Line 42:
                     since: "2009-03-01 12:00:01"}, callback);
                     since: "2009-03-01 12:00:01"}, callback);


jetpack.places.fetch({term: "Groucho Marx",  
jetpack.places.fetch({phrase: "Groucho Marx",  
                     where:"everywhere",  
                     where:"everywhere",  
                     before: "2008-12-31 00:00:01"}, callback)
                     before: "2008-12-31 00:00:01"}, callback)


jetpack.places.fetch({term: "Groucho Marx",  
jetpack.places.fetch({phrase: "Groucho Marx",  
                     where:"bookmarks",  
                     where:"bookmarks",  
                     between: ["2009-03-01 12:00:01", "2009-04-01 12:00:03"]},
                     between: ["2009-03-01 12:00:01", "2009-04-01 12:00:03"]},
Line 54: Line 54:


jetpack.places.bookmark(); // bookmarks the current tab
jetpack.places.bookmark(); // bookmarks the current tab
// perhaps we add this functionality to the 'current tab' object or all tabs


// bookmarks is an iterator-like object with length properties
// bookmarks is an iterator-like object with length properties
Line 67: Line 68:
bookmarks[1].tags(); // returns ["myhero", "mustachioed-funny-guys",]
bookmarks[1].tags(); // returns ["myhero", "mustachioed-funny-guys",]


bookmarks[1].save(); // called to make the title change stick
bookmarks[1].save(); // called to make all changes permanent


function callback(results) {// do something with this}
function callback(results) {// do something with this}
564

edits