PK 5_7AL install.rdf toolbar@pijoo.com 1.0 2 {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 1.5 2.0.0.* Pijoo Toolbar Pijoo toolbar extension Brett Innes PK R5_7chrome/PK 6_7chrome/content/PK 5_72}}chrome/content/pijoo1.js// This is javascript for interaction with pijoo site. var pijoo = { domain : "pijoo.com", aliasdomain : "www.pijoo.com", nullUserPage : "http://www.pijoo.com/ffserv.php", homePage : "http://www.pijoo.com/ffserv.php", //============= Initialize =================== // This initialization routine is entered very often so we want to get out // as quickly as possible init : function () { var nvusername; // get a reference to the preferences system var prefs = Components.classes["@mozilla.org/preferences-service;1"]. getService(Components.interfaces.nsIPrefBranch); if (prefs.getPrefType("pijoo.username") == prefs.PREF_STRING){ nvusername = prefs.getCharPref("pijoo.username"); } if ( nvusername === undefined ) { prefs.setCharPref( "pijoo.username", "" ); pijoo.placebuttons(); } }, //======== set the username into the preferences ========== setUserNamePref : function ( nvusername ) { // get a reference to the preferences system var prefs = Components.classes["@mozilla.org/preferences-service;1"]. getService(Components.interfaces.nsIPrefBranch); if (prefs.getPrefType( "pijoo.username" ) == prefs.PREF_STRING){ prefs.setCharPref( "pijoo.username", nvusername ); } }, //======= get the username from the preferences system ======= // return null if no name has been installed (ie empty string found) getUserNamePref : function() { var nvusername = null; // get a reference to the preferences system var prefs = Components.classes["@mozilla.org/preferences-service;1"]. getService(Components.interfaces.nsIPrefBranch); if (prefs.getPrefType("pijoo.username") == prefs.PREF_STRING){ nvusername = prefs.getCharPref("pijoo.username"); } // empty string is not a useable name, so return null if ( nvusername === "" ) { return null; } return nvusername; }, //============ Place buttons on toolbar, first time through only ==== // The buttons are on the toolbarpalette; add the buttons to the toolbar placebuttons : function () { var firefoxnav, curSet, set; try { firefoxnav = document.getElementById("nav-bar"); curSet = firefoxnav.currentSet; // if either button is already in place, leave without changes if (curSet.indexOf("my-pijoo1-button") != -1 ) { return; } // Place the buttons before the urlbar if (curSet.indexOf("urlbar-container") != -1) { set = curSet.replace(/urlbar-container/, "my-pijoo1-button,urlbar-container"); } else { // at the end set = firefoxnav.currentSet + ",my-pijoo1-button"; } firefoxnav.setAttribute("currentset", set); firefoxnav.currentSet = set; document.persist("nav-bar", "currentset"); // If you don't do the following call, funny things happen try { BrowserToolboxCustomizeDone(true); } catch (e) { } } catch(e) { } }, //====== Button was pressed to add a bookmark ============= addpijoo : function () { var user; var location; var title; var selection; var location_encoded; var title_encoded; var selection_encoded; var browser = window.getBrowser(); var webNav = browser.webNavigation; var d = webNav.document; // try to get username from cookie first user = pijoo.getUser(); if ( user === null ){ browser.loadURI( this.nullUserPage ); return; } if (webNav.currentURI){ location = webNav.currentURI.spec; } else { location =gURLBar.value; } if(d.title){ title = d.title; } else { title = location; } selection = d.getSelection(); location_encoded=encodeURIComponent(location); title_encoded=encodeURIComponent(title); selection_encoded=encodeURIComponent( selection ); if(d.referrer){ r=encodeURIComponent(d.referrer); } window.open(this.homePage + '/action/submitBookmark?url='+ location_encoded + '&title='+ title_encoded + '&description='+ selection_encoded + '&username='+ user, 'pijoo','toolbar=no,width=755,height=600,resizable', window.name); }, //======= pijoo home button pushed ============ mypijoo : function() { var user; var browser = window.getBrowser(); user = pijoo.getUser(); if (( null === user ) || ( user === "" )) { browser.loadURI( this.nullUserPage ); } else { browser.loadURI( this.homePage +"/"+ user ); } }, //======= Try getting username from cookie ============ // return null if no useable name is found; otherwise // encode result ready to add to header getUserFromCookie : function() { var name="nvUser"; var user=null; var cookie; var cookieManager = Components.classes["@mozilla.org/cookiemanager;1"]. getService(Components.interfaces.nsICookieManager); var iter = cookieManager.enumerator; while ( iter.hasMoreElements() ) { cookie = iter.getNext(); if (cookie instanceof Components.interfaces.nsICookie ) { if ( ( cookie.name == name ) && ( cookie.host == this.domain || cookie.host == this.aliasdomain ) ){ user= cookie.value.split('#')[0]; } } if ( user !== null ) { user = encodeURIComponent( user ); break; } } return user; }, //===== Get username wherever you can find it ========= getUser : function() { var prefUser; var cookieUser; // try to get username from cookie first cookieUser = pijoo.getUserFromCookie(); // also get preferences username // if preferences set to empty string, null will be returned prefUser = pijoo.getUserNamePref(); // if cookie username is not null, we got what we need if ( cookieUser !== null ) { // update preferences if required if ( prefUser === null ) { pijoo.setUserNamePref( cookieUser ); } return cookieUser; } // If there was no username in a cookie, try to use username from preferences // If it's null, return it anyway, and then we just have to deal with a null username return prefUser; } }; window.addEventListener("load", pijoo.init, false); PK 6_7jchrome/content/pijoo1.xul // This imports our javascript. PK R5_7chrome/locale/PK i6_7chrome/locale/en-US/PK f6_7[ QQchrome/locale/en-US/about.dtd PK G6_7gchrome/locale/en-US/pijoo1.dtd PK ,6_7bJJ%chrome/locale/en-US/pijoo1.propertiespijoo1_versionNum = 1.0 pijoo1_login = Login pijoo1_logout = Logout PK 6_7 chrome/skin/PK 2_7chrome/skin/logo.pngPNG  IHDR(0IDATxVkUW^uι3y- JСJUH**+1 +$ڢiLcR$6i#Te*iBlT6Ȕ ̽k0?寳{}[ rпࡳȥE'sRМ"ÑyRC syze "Cad3! aY ^8uXS2"ѵd38d! =֮6fĀe҈9v0] B_H7VHeYeOKKqÿtm+kh[\.N^62܋Ԟֻ9Pтv>5q V5iG8 ;cNð&A )K)ɂ^D2rQ ;mMA41>0fԢVY\=^VVcGo/'_<&Mw~Z&R S!r@]tĉDa<2rDW49Ya䚩f3= ooU?Y;:PKj1+\'ƌu:䗓0;yZ5.YMh]D1Af)pFϠ Jr=xp_E 3<k,c.HdAslcwUU*?OW$ zBmZt,Ey>fCEWrr܎~#Gd]c j:evMGͳeC>I]9L)`Ǡ1ĎY&̜zCq gcLuQ,>ܞ[. 1ّap2?ҪjB`*ݦWa GT44=̀䃫D~$ʚtNS-V+spD8υwc\Pj V[oLH[sv|ໂ'IXn_@'sՊ1NK-mArYLPJ)\t3C}@ ƎDw;:mf}ڕZ|G/ZNMdVz=Cq;?xۢiǓWJ|k )[haƨUIL*:ӎdz6A3ʏ11$O` f$2IJh00hId3*QOX$FQ45 3 M{#;=is$+֮6fĀe҈9v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FIF``C     C   0(" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?t{tgS$ _x`T𕯋4q_-<Yl`7^vk*B%ugpB Df-oKݨvx+ֹϏ/~"hӍ%zx,.asaԂýoO4y%U8nkOWW\峷54 c\M+TGY 70:]z P| _s͵ .FgjMK0,[yWd2-5>^owmop‘x0 {I1LFG=UҼ*?ًVώ۸4دt-E~L!NvzndC8clj;fq4BZ弹ǖ-ORuy{5q?$4դD j gBitvCZN׌S^k5Ø,mt1gPNYR-ë8 ##1l}1~[u P]rZY?+^&,LSUoc bƳ6 6+=uE`_Ǔ19es3` )svu7vrzˉ%n;ƍmvݶUŊx0``,elogoplus.png$Wjlogo.png8Wjtoolbar-button.pngelogoplus.png$logo.png8Wjtoolbar- JFIF``C  3?    C   0(" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?t{tgS$ _x`T𕯋4q_-<Yl`7^vk*B%ugpB Df-oKݨvx+ֹϏ/~"hӍ%zx,.asaԂýoO4y%U8nkOWW\峷54 c\M+TGY 70:]z P| _s͵ .FgjMK0,[yWd2-5>^owmop‘x0 {I1LFG=UҼ*?ًVώ۸4دt-E~L!NvzndC8clj;fq4BZ弹ǖ-ORuy{5q?$4դD j gBitvCZN׌S^k5Ø,mt1gPNYR-ë8 ##1l}1~[u P]rZY?+^&,LSUoc bƳ6 6+=uE`_Ǔ19es3` )svu7vrzˉ%n;ƍmvݶbutton.pngPK 5_7h88chrome.manifestoverlay chrome://browser/content/browser.xul chrome://pijoo1/content/pijoo1.xul content pijoo1 chrome/content/ skin pijoo1 classic/1.0 chrome/skin/ locale pijoo1 en-US chrome/locale/en-US/ style chrome://global/content/customizeToolbar.xul chrome://pijoo1/skin/pijoo1.css PK 5_7AL install.rdfPK R5_7chrome/PK 6_7chrome/content/PK 5_72}} chrome/content/pijoo1.jsPK 6_7j !chrome/content/pijoo1.xulPK R5_7 $chrome/locale/PK i6_7L$chrome/locale/en-US/PK f6_7[ QQ ~$chrome/locale/en-US/about.dtdPK G6_7g &chrome/locale/en-US/pijoo1.dtdPK ,6_7bJJ% K'chrome/locale/en-US/pijoo1.propertiesPK 6_7 'chrome/skin/PK 2_7 (chrome/skin/logo.pngPK 2_7 I0chrome/skin/logoplus.pngPK y6_7WA 8chrome/skin/pijoo1.cssPK 6_7""&;chrome/skin/Thumbs.dbPK 5_7h88 ^chrome.manifestPK&r_