home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2005 March / PCpro_2005_03.ISO / files / firefox / adblock-0.5-dev.xpi / chrome / adblock.jar / content / adblock.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-03  |  2.2 KB  |  61 lines

  1. <?xml version="1.0"?>
  2.  
  3. <bindings id="adblockBindings"
  4.         xmlns="http://www.mozilla.org/xbl"
  5.         xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  6.         xmlns:html="http://www.w3.org/1999/xhtml">
  7.  
  8.  
  9. <binding id="adblockloadmechanism" display="xul:button">
  10.     <implementation>
  11.         <constructor>
  12.             <![CDATA[
  13.             
  14.                 //initAdblockPrefObserver(); // trip the pref-observer to set our display-status
  15.                 if (!this.loaded) {
  16.                     this.loaded = true;
  17.                     abLoad = function() { adblockPrefObserver.load(); };
  18.                     window.addEventListener("load", abLoad, true);
  19.                     //setTimeout("adblockPrefObserver.load();", 0);
  20.                     this.style.setProperty("display", "none", null);
  21.                 }
  22.  
  23.                 
  24.             ]]>
  25.         </constructor>
  26.     </implementation>
  27. </binding>
  28.  
  29. <binding id="statusbarpanel" display="xul:button">
  30.     <content>
  31.         <xul:spacer flex="1"/>
  32.         <xul:label id="adblock-status-text" value="Unloaded" class="statusbarpanel-text"/>
  33.         <xul:spacer flex="1"/>
  34.     </content>
  35.  
  36.     <implementation>
  37.         <constructor>
  38.             <![CDATA[
  39.             
  40.                 // if the statusbar is initially disabled, then re-enabled, our element is bound from scratch, requiring our pref-observer to re-sync
  41.                 adblockPrefObserver.statusText = document.getAnonymousNodes(this)[1];
  42.                 if (adblockPrefObserver.windowInit && !this.dragReload) 
  43.                     adblockPrefObserver.observe(null, null, "adblock.enabled"); // element is rebound on insertion
  44.  
  45.                 
  46.             ]]>
  47.         </constructor>
  48.     </implementation>
  49.     <handlers>
  50.         <!-- My idea was to pop up a contextmenu on rightclick that would allow for disabling/enabling of adblock without opening prefs -->
  51.         <!--
  52.         <handler button="2" event="click" clickcount="1" action="window.open('chrome://adblock/content/about.xul','Adblock Preferences','chrome,centerscreen,resizable');"/>
  53.         <handler button="0" event="click" clickcount="2" action="window.open('chrome://adblock/content/settings.xul','Adblock Preferences','chrome,centerscreen,resizable');"/>
  54.         -->
  55.         <handler button="0" event="click" clickcount="1" action="filterAllDialog(true);"/>
  56.         <!-- Button 0 is left mouse, button 2 is right mouse (button 1 center) -->
  57.         <!-- Using the doubleclick doesn't seem to work very well because the singleclick is still activated. -->
  58.     </handlers>
  59. </binding>
  60.  
  61. </bindings>