Firefox Extension/Addon - Detect workspace locked

i'm searching for a solution in my firefox addon to detect when the user workspace has locked/released. In google chrome there is an easy API chrome.idle.onStateChanged.addListener for it, is there something similar in firefox or any possibility to do that, platform independent? By the way, i use the addon sdk.

I've already tried the idle service Cc["@mozilla.org/widget/idleservice;1"].getService(Ci.nsIIdleService) but i just gives me access to some idle timeout or system when go to sleep and not to just workspace locked.

Edit: With "workspace locked" i mean the user lock the workspace with ctrl + alt + delete. I don't know how this exactly work on OSX or linux.

Edit2: I working in Windows 8.1 currently, but i guess the chrome.idle handler works cross platform.

Edit3: What i currently get out of current answers is 1. That there not exist a cross-platform solution, neither in chrome nor in firefox. chrome.idle.onStateChanged seems to work different on windows, linux and osx. Only windows can handle that "locked" behaviour as expected. I can't test OSX, on ubuntu 14 it doesn't work for me. 2. For firefox there some in-depth code things to try to make it working - See answer bellow from Noitidart in this topic.

we see in this search results 2 implementations, mac and windows it looks like no support for linux, which is curious because the chrome.idle page doesnt mention this on docs, maybe i just couldnt find it

As erikvold has said, the link to your Uedit.js script is wrong. This is the minimum that is wrong and is the thing that is complained about in the console: browser.xul:5 is line 5 in browser.xul, which is: <script src="Uedit.js" /> You state that you have tried: <script src="chrome://Uedit/Uedit.js" />...

Standard Effectively, a change in CSS Syntax Module now allows identifiers to start with two hyphens: 4.3.9. Check if three code points would start an identifier Look at the first code point: U+002D HYPHEN-MINUS If the second code point is a name-start code point or a U+002D HYPHEN-MINUS, or the...

With iframe in XUL you must create it with the HTML namespace otherwise things like load events don't work right, see this topic: http://forums.mozillazine.org/viewtopic.php?f=19&t=2809781&hilit=+iframe Once you do that, changing src etc should work as expected....

The above link is for GA debugger extension. I just managed to check the google analytics parameters in firefox. Hope this helps. Open firefox browser->Tools->WebDeveloper-> webConsole You would be prompted with a seperate or autofitted window. Then go to Tool Box options-> Enable google Chrome addon debugging in advanced settings....

Unfortunately it doesn't appear that this can be achieved with the current support (Safari is surprisingly behind on this), and so I have had to take the decision to about using font-feature-settings for the small caps part of the job. I will instead use font-variant: small-caps until the adoptive rate...

Shouldn't you use this for microphone? var microphone = audioContext.createMediaStreamSource(); instead of this var microphone = audioContext.createMediaStreamDestination(); A microphone is not a destination. It is a source....

To update placeholder property "correctly", you need to add .blur() at the end of .prop or .attr statement. And in this case you also need to call the .addClass and .removeClass after set placeholder. JavaScript: $('#select').on('change', function () { if (this.value == 'short') { $('#input').prop('placeholder', 'Type there...').blur().addClass('short'); $('#input2').addClass('short').prop('disabled',false); } else...

From here To summarize: In case you are using "Clear history when Firefox closes": do not clear Cookies do not clear Site Preferences Clearing cookies will remove all specified (selected) cookies including cookies that have an allow exception. Tools > Options > Privacy: History: [X] Clear history when Firefox closes...

in Mozilla Firefox font rendering and line height rendering of the font differ between devices and automatically calculated so it differs between devices. the solution was to set Static Constant line height for all html elements and forcing this change. CSS StyleSheet Change: @import "amiri_font/amiri.css"; *{ font-family: AmiriWeb, 'Amiri QuranWeb',...

You can use this. This would select the anchor descendants of section and get you the second node. This works with xslt processor, hope this works with Selenium //section[@id='mysection']/descendant::a[2] ...

The feature you're referring to is called the "split console." You have it toggled on currently. It will show when a tab other than the console is selected. You can click in the split console, or command+alt+k on OSX, and hit escape to close it, or click on the console...

If the Expires header is set to 0, the browser interprets it as 1 January 1970, which relates to the Unix time aka POSIX time. Because this date lies in the past, this means that the request is not cached. The Expires header is defined within RFC 7234, which includes...

Pretty sure you cant style the drop down box itself, just the input field. The box is rendered by the operating system so the only way to have control over the select is to use a plugin. I would recommend the use of Chosen.js to have it look the same...

You only have defined the font name sans-serif which is not a font per se, just tells the browser to use any sans serif font the browser prefers. But even if you give a concrete font name, be aware that the installed fonts in Win / Linux are not the...

You should be able to just use the standard Browser Toolbox and use the inspector to select the item in your sidebar that you want to work on. It's not as seamless as using the context menu but should get you what you need. Once you've enabled it and opened...

Yeah this is possible: Install firefox app Place XPI-file on your android device Install good file explorer like: ES File Explorer File Manager Open XPI with file explorer and choose firefox Add-on should get installed now. This should work PS: if file explorer doesn't give option to open with firefox,...

I found a work around that seems to work in Firefox. I change the type of input to number on focus giving me the proper keypad on mobile but then change the type back to text on blur giving me to two decimal places. See the code below... $('input.drawer').on('blur', function(){...

Ok, so I figured out what was wrong. It turns out that my css actually had the .less extension so it was getting parsed by less.js for roughly 16ms which delayed the initial styles past the point where firefox was executing the $(document).ready(). Changing it to .css fixed the problem....

Thank you @depperm for your help in isolating the issue to the input type="radio". For whatever reason checkboxes are better supported on firefox and already have the ability to be check and unchecked. I added a name to each input and some code to prevent multiple checkboxes from being selected...

Thanks @Shakur I didn't catch that e and yep you're right it needs to be fixed to enum. I'm not familiar with cookie service, I would have to read up on it but you're on right track. This is because you have not defined Ci you use Ci in the...

I have found the answer. (It took me for a day at work) fp = webdriver.FirefoxProfile() ... set your profile attributes pf.update_preference() #the answer I think it's important to paste this line at the end of profile definition. Selenium API should put this line into their documentation....

(Not technically an answer but SO won't let me comment.) You could try cfx run, then uninstalling the addon from the FF session it opened, then installing the xpi in that same session by doing a file open of the xpi (which will install it). Have a feeling it will...

You need the menubar id, which is main-menubar and also your missing the menupopup. I have not tested, but this looks right to me: <menubar id="main-menubar"> <menu id="test-menu" label="TEST" accesskey="d"> <menupopup id="test-popup"> <menuitem id="example-item2" oncommand="alert('Hello!');" label="TEST" accesskey="i"/> </menupopup> </menu> </menubar> If your trying to find the id of things like...

Weird. button elements have some special behavior which seems to conflict with flexbox. Specifically, what happens is that the flex items are blockified, according to the spec: The display value of a flex item is blockified: if the specified display of an in-flow child of an element generating a flex...

If you CSS is not inside a Polymer element you need to add the polyfill version of the selectors to make it work on browsers without native shadow-DOM support html paper-dialog, html /deep/ paper-dialog { margin-top: -150px; margin-left: -300px; } html paper-dialog core-animated-pages, html /deep/ paper-dialog /deep/ core-animated-pages{ height: 300px;...

The short answer to this is: "Yes." Firefox add-ons have the ability to have almost complete control of the user interface. In this instance, the first level of XUL content that you would want to look at is contained in chrome://browser/content/browser.xul. This file is contained within the omni.ja archive in...

After checking for a while, I've been headed to another question similar to this one, but with a very different matter. In any case, since the problem is the context menu, you don't even need jQuery for such, and the solution (despite it WON'T always work in firefox because the...

Sorry for asking I found the answer next to my question on the right side panel! For those who are looking for the same problem : var player = document.getElementById('movie_player').wrappedJSObject; should do the trick....

When you connect your phone, you have to accept remote debugging. Then on the left of the window, you should see a dropdown menu with the apps that you can debug. By default, you can only debug unprivileged applications. Click on the app, the you want to debug and in...

I don't really know what is wrong per sey, but I would imagine that you are having memory issues. I was using Gridx with about 15,000 rows and had lots of problems with memory until I implemented the JSONRest store. For so many rows, I would strongly recommend to use...

The code you found was for use in a Firefox extension. You’re not writing a Firefox extension, you’re using a web page, so you can’t use that code. There’s no drop-in replacement; you’ll have to find something else.

http://code.metager.de/source/xref/mozilla/firefox/netwerk/cache/nsICacheService.idl This looks like a hint * @throws NS_ERROR_NOT_IMPLEMENTED when the cache v2 is prefered to use. https://bugzilla.mozilla.org/show_bug.cgi?id=913807 I’m thinking that all we need to do is change 1 to 2 in this line in the var cacheService = cc["@mozilla.org/network/cache-service;1"] .getService(ci.nsICacheService);...