"Going FullScreen" and "Exiting FullScreen" signals? - google-chrome-extension

I am writing a Chrome extension that would send a http request to a local server to increase screen brightness when a website goes fullscreen (In this case Youtube and Netflix) and send another request when the screen gets out of Fullscreen mode.
I have searched around on the web and found that I can probably constantly keep check if the browser is in FullScreen mode or not (https://stackoverflow.com/a/23971798/4617277) but haven't found out if there is some sort of signal/event that I could subscribe to ?
I intend to use this extension mainly on Linux based systems.

Related

flutter web records only mouse movements, and not the screen

I am trying to record screen sessions in a simple hello world flutter web.
I am allready tries using Hotjar, Inspectlet, Smartlook as third party SW for the screen recording.
I implement the code each of the application in the index.html as instructed by each SW.
I only see mouse movements but the screen is blank (happen in all 3 apps).
When I use the network inspect I see that I get status response 200 when reaching the recording app (and there is a nre recorded session with mouse movements, so I know the code works)
As I understand, the above SW can't fetch the css files from the website the static pages are hosting, after the session ends.
I am building hosting the pages using codeMagic, the website is here
How do I solve this issue ?

How to handle browser popup in Robot framework when monitor screen is close

My script in Robot framework use White library to find a popup window and authenticates a user by entrering his username and password, then clicking on button to connect.
The script works well when monitor screen is open but fails when monitor screen is closed (i.e. windows session locked (ctrl+alt+del)). Script must be launched automatically any time by Jenkins. For this reason no screen is needed during test execution.
I have tried with Autoit library too without success, and I also tried to send credentials in URL like this "http://user:password#myserverurl.com". Which did not work because this popup appears in middle of the scenario of another application which authentication has already been made through another login page in the beginning of scenario.
Please send me your suggestions if there is a way to simulate an opened monitor screen or another library that I can use to handle browser popup when monitor screen is close.
Thank you in advance. My code :
WhiteLib.Attach Window ${windowTitle}
WhiteLib.Press Keys ${user}
WhiteLib.Press Special Key TAB
WhiteLib.Press Keys ${password}
WhiteLib.Press Special Key TAB
WhiteLib.Press Special Key RETURN

Prevent SWT Browser Widget modal dialog popups

On my application, I'm using the SWT browser widget to check for network connectivity. The reason for this is long, but long story short I HAVE to use the browser widget to check for connectivity. Unfortunately, on Mac and Debian, I get a modal dialog that pops up and tells me that the page load failed.
This message is being passed from the native browser and the SWT browser widget is passing this message through, displaying it as a modal dialog box. I need to intercept this message and handle it, displaying a more useful message to users in the event of a "Page load failed". Here's a screenshot of what it looks like:
Does anyone know how to intercept these messages instead of displaying them to the user?
Few days ago, there was almost same question How to detect internet connection with SWT browser (or handle server not available). Check the answer for code, which might help you..

browser related question

I get different behavior between IE and Mozilla.
Say for ex I have 2 buttons on my webpage. Button-1 and Button-2
In mozilla browser, when I click Button-1 then it process the click request of Button-1, while it is processing the request, immediately if I Click on button-2, browser will not proceed request for Button-2.
In IE browser, after clicking Button-1 If I immediately click Button-2 then it will first process request of Button-1 and then it will process request for Button-2.
Why there is different behavior for both browser for same web page?
PS. IE 8 and Mozilla 3
Thats's life
Browser differences are one of the biggest hurdles in modern web development. You're best bet is to paste the code to let users take a look.

Message Passing variables for a chrome extension

I've read the message passing page repeatedly and tried multiple variations of it and I'm assuming I'm making a small mistake.
What I'm trying to do: I want to grab the background color of a page with a content script and then send that information to my popup (not a background page; I don't know if that matters) and then allow the popup to (simple example) write that variable in the popup.
Content scripts run in the same process as the webpage (the "tab" process). Popups run in the same process as the background page (the "extension" process).
It sounds like you want the popup to send a request to the content script using chrome.tabs.sendRequest. The content script should be listening for requests using chrome.extension.onRequest.
Or, you might do it the other way around: the content script sends the request to the extension using chrome.extension.sendRequest and the popup listens for requests using chrome.extension.onRequest. When you send a request from a tab to the extension, any page in the extension process (popups or background) can listen for that request.
See the message passing tutorial which includes examples that you can copy and paste.

Resources