1. ALTCTRL Extensie firefox ca si greasemonkey , shiftspace, extensiile firefox dau putere utilizatorului asupra modului de interactionare cu webul Altctrl il ajuta la cumparaturile online
2. Scurta descriere Dupa instalare, veti vedea textul altctrl pe status-bar in coltul din dreapta. Navigati in magazinul online preferat, ajungeti pe pagina de detalii a produsului , apoi click pe altctrl din status si veti obtine preturile de la celelate magazine.
10. Obiecte in javascript pentru organizarea codului si usurarea mentenantei lui Simplu: var myObj = {}; varianta aleasa de mine: function _altctrl_PriceListManager(){ this.divLista = createNode('div'); this.storesTable = createNode('table'); this.orderedStoreRows = []; .... } adaugarea unei metode acestui obiect: _altctrl_PriceListManager.prototype.sortRows = function(){ this.orderedStoreRows.sort(sortByPrice); for(var i=0;i<this.orderedStoreRows.length;i++){ this.orderedStoreRows[i].insertIntoTable(this.storesTBody); } } ----------------------------------- var manager = new _altctrl_PriceListManager(); manager.sortRows();
11. Apelarea unei functii in scopuri/contexte diferite var tickTack = function(){ if(typeof this.idx == 'undefined'){ this.idx=0; } else{ this.idx++; if(this.idx==4) this.idx=0; } this.ctx++; if(_altctrl_TICK_INTERVAL*this.ctx>_altctrl_TIMEOUT_REQUEST){ _altctrl_list.priceRequesters[this.name].cancelWorkState(); } else this.priceCell.innerHTML=_altctrl_ticks[this.idx]; } ----------------------------------------------------- var obj = this.priceListManager.storeRows[this.storeName]; this.tickFlag = setInterval(function(){tickTack.apply(obj);},_altctrl_TICK_INTERVAL);
12. Apelarea unei functii in scopuri/contexte diferite cu pasarea unor argumente function _altctrl_PriceRequester(storeName){ this.storeName=storeName; this.storeBrowser = getStoreBrowser(storeName); var obj = this; this.storeBrowser.addEventListener("load", function (event) { obj.processLoad.apply(obj,[event]); }, true); }