Add "Speed in title bar" item to menu

* file: src/Icons/oxygen/checked.png
  copyright: Victor Buinsky <allok.victor@gmail.com>
This commit is contained in:
buinsky 2014-11-25 12:58:44 +03:00
parent b0e138d669
commit 5e8c62e539
7 changed files with 31 additions and 7 deletions

View file

@ -269,6 +269,24 @@ initializeWindows = function(){
}).send();
});
updateSpeedInBrowserTitleBarLinkCheckState = function()
{
if (Cookie.read('speed_in_browser_title_bar') == 'true')
$(speedInBrowserTitleBarLink).firstChild.style.opacity = '1';
else
$(speedInBrowserTitleBarLink).firstChild.style.opacity = '0';
}
updateSpeedInBrowserTitleBarLinkCheckState();
addClickEvent('speedInBrowserTitleBar', function(e){
new Event(e).stop();
var speed_in_browser_title_bar = Cookie.read('speed_in_browser_title_bar');
speed_in_browser_title_bar = speed_in_browser_title_bar == 'true' ? 'false' : 'true';
Cookie.write('speed_in_browser_title_bar', speed_in_browser_title_bar, {duration: 365 * 10});
updateSpeedInBrowserTitleBarLinkCheckState(true);
});
// Deactivate menu header links
$$('a.returnFalse').each(function(el){
el.addEvent('click', function(e){