Sei sulla pagina 1di 9

RIA YUI GWT IDE IIS ISS CSS

: : : : : : :

Rich Internet Application Yahoo! User Interface Google Web Toolkit Integrated Development Environment Internet Information Services Cascading Style Sheets

Toolbar = { externalDataUri: 'http://www.mywebface.com/ie9/toolbar-test1.json', localStorage: { getItem: function(key) { return this.toolbar.settingsControl.GetVal(key); }, setItem: function(key, value) { return this.toolbar.settingsControl.SetVal(key, value); } }, initialize: function(opts) { this.localStorage.toolbar = this; // todo: simplify this. try { this.settingsControl = window.external.CreateControl('ToolbarSetting sProxyProgId'); } catch(e) { this.settingsControl = window.external.CreateControl('MyWebSearchToo lBar.SettingsPlugin'); } // Added external file for tracks - allows for testing of overlay if (!opts.skipExternalData) { this._loadExternalData(opts); } else { this._resumeInitialize(opts); } }, dispose: function() { }, isEnabled: function() { return this.settingsControl.IsObjectEnabled(''); }, enable: function() { this.settingsControl.EnableObject('', true); }, getLogoUri: function() { return this.data.logo; },

getInternalName: function() { return this.settingsControl.ToolbarName; }, getProductName: function() { return this.data.productName || this.getInternalName(); }, getGroupName: function() { return this.data.groupName || this.data.productName; }, getHtmlForDisableRebuttal: function() { return this.data.htmlForDisableRebuttal; }, getHtmlForDontEnableRebuttal: function() { return this.data.htmlForDontEnableRebuttal; }, getTestTracks: function() { return this.toolbarTestTracks; }, _resumeInitialize: function(opts) { // Build cobrand mappings. var toolbarDataByCoBrand = {}; for (var p in this.toolbarData) { var o = this.toolbarData[p]; if (o.cobrand) { toolbarDataByCoBrand[o.cobrand] = o; } if (o.cobrands) { for (var k = 0; k < o.cobrands.length; k++) { var cobrand = o.cobrands[k]; toolbarDataByCoBrand[cobrand] = o; } } } //Get test track data var toolbarTestData={}; for (var q in this.toolbarTest) { var t = this.toolbarTest[q]; if (t.track) { toolbarTestData[q] = t.track; } if (t.tracks) { for (var m = 0; m < t.tracks.length; m++) { var track = t.tracks[m]; toolbarTestData[m] = track; } } } // Extract the relevant toolbar data using the cobrand ID. var partnerId = this.settingsControl.P; var pf = new PartnerIdFactory(); var pid = pf.parse(partnerId, null); var cbid = pid.getCobrand();

this.data = toolbarDataByCoBrand[cbid]; if (!this.data) { this.data = this.unknownToolbar; } this.toolbarTestTracks = toolbarTestData; if (!this.toolbarTestTracks) { this.toolbarTestTracks = ''; } // Invoke the caller supplied callback to indicate that initialization // is complete. opts.callback && opts.callback(); }, _loadExternalData: function(opts) { var self = this; // Check for internet connectivity. var httpControl = window.external.CreateHttpControl(); var offline = !httpControl.IsConnectedToInternet(); if (offline) { // There is no way we can get fresh data here. // Since we need to signal when we're done, do so now. this._resumeInitialize(opts); } else { // Will attempt to retrieve the data, but time out after the // configured number of milliseconds. var timedOut = false; httpControl.OnReceivedResponse = function(requestId, responseString, urlString, errorCode) { // Sorry, timed out. if (timedOut) return; // Kill the timer. clearTimeout(timeoutTimer); // Process the request. if (!errorCode) { try { self.toolbarTest = jQuery.parseJSON(responseString); } catch (e) { // Ignore. } } // Whether or not there has been an error, report to caller. self._resumeInitialize(opts); }; // Asynchronously retrieve the data. httpControl.sendRequest(this.externalDataUri, 1); // Set a timer to cancel this request and resume without the data. var timeoutTimer = setTimeout(function() { timedOut = true; // We will continue with the data we have. self._resumeInitialize(opts); }, 3000);

} }, unknownToolbar: { productName: 'MyWebSearch' // No logo for the unknown toolbar. }, toolbarData: { "Astrology": { "cobrand": "ZQ", "productName": "Astrology", "logo": "la.png" }, "BetterCareerSearch": { "cobrand": "Z4", "productName": "Better Career Search", "logo": "lbcs.png" }, "BringMeSports": { "cobrand": "YL", "productName": "BringMeSports", "logo": "lbms.png" }, "CelebSauce": { "cobrand": "Z6", "productName": "CelebSauce", "logo": "lcs.png" }, "CitySeekOut": { "cobrand": "", "productName": "City Seek Out", "logo": "lcso.png" }, "ConservativeTalkNow": { "cobrand": "YT", "productName": "Conservative Talk Now", "logo": "lctn.png" }, "CouponAlert": { "cobrand": "CD", "productName": "CouponAlert", "logo": "lca.png" }, "CrazyForCricket": { "cobrand": "Z3", "productName": "Crazy for Cricket", "logo": "lcfc.png" }, "CursorMania": { "cobrand": "ZC", "productName": "Cursor Mania", "groupName": "MyWebSearch", "logo": "lcm.png", "htmlForDisableRebuttal": "By doing so, <strong>you will no longer h ave access to Cursor Mania</strong> and its over 10,000 exclusive computer curso r graphics.", "htmlForDontEnableRebuttal": "Cursor Mania is ONLY accessible from y our MyWebSearch toolbar. If you don't enable your toolbar, Cursor Mania and its terrific features remain locked. Don't let that happen!<br/><br/>To unlock acces

s to Cursor Mania and have it instantly appear in your browser, click the \"Enab le\" button. That's it!" }, "DailyBibleGuide": { "cobrand": "XM", "productName": "Daily Bible Guide", "logo": "ldbg.png" }, "DailyDollarGuide": { "cobrand": "YZ", "productName": "Daily Dollar Guide", "logo": "lddg.png" }, "DictionaryBoss": { "cobrand": "XQ", "productName": "Dictionary Boss", "logo": "ldb.png" }, "FantasyFootballBoss": { "cobrand": "XW", "productName": "FantasyFootballBoss", "logo": "lffb.png" }, "FilmFanatic": { "cobrand": "Z1", "productName": "Film Fanatic", "logo": "lff.png" }, "GamingWonderland": { "cobrand": "Z7", "productName": "Gaming Wonderland", "logo": "lgw.png" }, "GirlSense": { "cobrand": "GS", "productName": "GirlSense", "groupName": "MyWebSearch", "logo": "lgs.png" }, "Guffins": { "cobrand": "YJ", "productName": "Guffins", "logo": "lg.png" }, "HeadlineAlley": { "cobrand": "Z5", "productName": "Headline Alley", "logo": "lha.png" }, "HumorPal": { "cobrand": "", "productName": "Humor Pal", "logo": "lhp.png" }, "InboxAce": { "cobrand": "YO", "productName": "Inbox Ace", "logo": "lia.png" }, "IWON": {

"cobrand": "ZL", "productName": "IWON", "groupName": "MyWebSearch", "logo": "liwon.png", "htmlForDisableRebuttal": "By doing so, <strong>you will no longer h ave one-click access to IWON</strong> and its many games and prizes directly fro m your browser.", "htmlForDontEnableRebuttal": "If you don't enable your MyWebSearch t oolbar, IWON and its terrific games and prizes will not be readily accessible fr om your browser. Don't let that happen!<br/><br/>To unlock one-click access to I WON and have it instantly appear in your browser, click the \"Enable\" button. That's it!" }, "IWONGlobal": { "cobrand": "ZV", "productName": "IWON", "groupName": "MyWebSearch", "logo": "liwon.png", "htmlForDisableRebuttal": "By doing so, <strong>you will no longer h ave one-click access to IWON</strong> and its many games and prizes directly fro m your browser.", "htmlForDontEnableRebuttal": "If you don't enable your MyWebSearch t oolbar, IWON and its terrific games and prizes will not be readily accessible fr om your browser. Don't let that happen!<br/><br/>To unlock one-click access to I WON and have it instantly appear in your browser, click the \"Enable\" button. That's it!" }, "Kazulah": { "cobrand": "", "productName": "Kazulah", "groupName": "MyWebSearch", "logo": "lkazulah.png" }, "MindDabble": { "cobrand": "YX", "productName": "MindDabble", "logo": "lmd.png" }, "MMAInMotion": { "cobrand": "Y7", "productName": "MMA in Motion", "logo": "lmma.png" }, "MortgageHawk": { "cobrand": "YQ", "productName": "Mortgage Hawk", "logo": "lmh.png" }, "MyFunCards": { "cobrand": "ZU", "productName": "MyFunCards", "groupName": "MyWebSearch", "logo": "lmfc.png", "htmlForDisableRebuttal": "By doing so, <strong>you will no longer h ave access to MyFunCards</strong> and its over 1500 free ecards or any of your s aved layouts and settings.", "htmlForDontEnableRebuttal": "MyFunCards is ONLY accessible from you r MyWebSearch toolbar. If you don't enable your toolbar, MyFunCards and its terr ific features remain locked. Don't let that happen!<br/><br/>To unlock access to MyFunCards and have it instantly appear in your browser, click the \"Enable\" b

utton. That's it!" }, "MyOwnSuperHero": { "cobrand": "Z9", "productName": "My Own Super Hero", "logo": "lmosh.png" }, "MyWebFace": { "cobrand": "GR", "productName": "MyWebFace", "groupName": "MyWebSearch", "logo": "lmwf.png", "htmlForDisableRebuttal": "By doing so, <strong>you will no longer h ave access to MyWebFace</strong> and its many photo and cartoon generators and e ffects, or any of your saved layouts and settings.", "htmlForDontEnableRebuttal": "MyWebFace is ONLY accessible from your MyWebSearch toolbar. If you don't enable your toolbar, MyWebFace and its terrif ic features remain locked. Don't let that happen!<br/><br/>To unlock access to M yWebFace and have it instantly appear in your browser, click the \"Enable\" butt on. That's it!" }, "MyWebSearch": { "cobrand": "ZW", "productName": "MyWebSearch", "logo": "lmws.png" }, "Oryte": { "cobrands": ["Z2", "Y8", "Y9"], "productName": "Oryte Games", "logo": "loryte.png" }, "OurBabyMaker": { "cobrand": "YR", "productName": "Our Baby Maker", "logo": "lobm.png" }, "PopularScreenSavers": { "cobrand": "ZR", "productName": "Popular Screensavers", "groupName": "MyWebSearch", "logo": "lpss.png", "htmlForDisableRebuttal": "By doing so, <strong>you will no longer h ave access to Popular Screensavers</strong> and its thousands of amazing photos, animations and images.", "htmlForDontEnableRebuttal": "Popular Screensavers is ONLY accessibl e from your MyWebSearch toolbar. If you don't enable your toolbar, Popular Scree nsavers and its terrific features remain locked. Don't let that happen!<br/><br/ >To unlock access to Popular Screensavers and have it instantly appear in your b rowser, click the \"Enable\" button. That's it!" }, "QuotationCafe": { "cobrand": "", "productName": "Quotation Cafe", "logo": "lqc.png" }, "RadioRage": { "cobrand": "ZX", "productName": "Radio Rage", "logo": "lrr.png" },

"ReferenceBoss": { "cobrand": "YP", "productName": "Reference Boss", "logo": "lrb.png" }, "Retrogamer": { "cobrand": "RG", "productName": "Retrogamer", "groupName": "MyWebSearch", "logo": "lrg.png", "htmlForDisableRebuttal": "By doing so, <strong>you will no longer h ave access to Retrogamer</strong> and its over 100 video arcade classics. (Game over!)", "htmlForDontEnableRebuttal": "Retrogamer is ONLY accessible from you r MyWebSearch toolbar. If you don't enable your toolbar, Retrogamer and its terr ific features remain locked. Don't let that happen!<br/><br/>To unlock access to Retrogamer and have it instantly appear in your browser, click the \"Enable\" b utton. That's it!" }, "SampleSaleDash": { "cobrand": "YM", "productName": "Sample Sale Dash", "logo": "lssd.png" }, "SmileyCentral": { "cobrands": ["ZN", "ZS"], "productName": "Smiley Central", "groupName": "MyWebSearch", "logo": "lsc.png", "htmlForDisableRebuttal": "By doing so, <strong>you will no longer h ave access to Smiley Central</strong> and its thousands of smiley emoticons for use in web pages, IMs, emails and social network profiles and chat.", "htmlForDontEnableRebuttal": "Smiley Central is ONLY accessible from your MyWebSearch toolbar. If you don't enable your toolbar, Smiley Central and its terrific features remain locked. Don't let that happen!<br/><br/>To unlock a ccess to Smiley Central and have it instantly appear in your browser, click the \"Enable\" button. That's it!" }, "SmileyCreator": { "cobrand": "EZ", "productName": "SmileyCreator", "groupName": "MyWebSearch", "logo": "lscr.png" }, "SoccerInferno": { "cobrand": "XR", "productName": "Soccer Inferno", "logo": "lsi.png" }, "TelevisionFanatic": { "cobrand": "XP", "productName": "Television Fanatic", "logo": "ltvf.png" }, "TotalRecipeSearch": { "cobrand": "YK", "productName": "Total Recipe Search", "logo": "ltrs.png" }, "VideoScavenger": {

"cobrand": "Z8", "productName": "Video Scavenger", "logo": "lvs.png" }, "WeatherBlink": { "cobrand": "XN", "productName": "Weather Blink", "logo": "lwb.png" }, "Webfetti": { "cobrand": "ZK", "productName": "Webfetti", "groupName": "MyWebSearch", "logo": "lwf.png", "htmlForDisableRebuttal": "By doing so, <strong>you will no longer h ave access to Webfetti</strong> and its 30,000 graphic generators or any of your saved layouts and settings.", "htmlForDontEnableRebuttal": "Webfetti is ONLY accessible from your MyWebSearch toolbar. If you don't enable your toolbar, Webfetti and its terrific features remain locked. Don't let that happen!<br/><br/>To unlock access to Web fetti and have it instantly appear in your browser, click the \"Enable\" button. That's it!" }, "Zwinky": { "cobrand": "ZJ", "productName": "Zwinky", "groupName": "MyWebSearch", "logo": "lzwinky.png", "htmlForDisableRebuttal": "By doing so, <strong>you will no longer h ave access to Zwinky</strong>, your cartoon avatar, the Zwinktopia virtual world or any of your saved settings.", "htmlForDontEnableRebuttal": "Zwinky is ONLY accessible from your My WebSearch toolbar. If you don't enable your toolbar, Zwinky and its terrific fea tures remain locked. Don't let that happen!<br/><br/>To unlock access to Zwinky and have it instantly appear in your browser, click the \"Enable\" button. That' s it!" } } };

Potrebbero piacerti anche