mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
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:
parent
b0e138d669
commit
5e8c62e539
7 changed files with 31 additions and 7 deletions
|
@ -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){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue