
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Fullscreen API. This module injects APIs to the DOM. So, you don't have to consider about the prefix such as 'moz' or 'webkit'.
The implementation follows the standard specification at Fullscreen API - WHATWG.
See also this project page.
$ npm install --save fullscrn
These methods returns promise.
Use document.addEventListener
to handle events while
this module does not supoort the event handlers -
Document.onfullscreenchange
and onfullscreenerror.
"fullscreenchange"
"fullscreenerror"
sample/injected.html [live sample].
<body onload="main();">
<button type="button" onclick="request1();"
>Full>></button>
<span id="panel">
<button type="button" onclick="request2();"
>Full>></button>
<button type="button" id="exitButton"
onclick="exit();"><<Exit</button>
</span>
<script src="../fullscrn.js"></script>
<script>
var panel = document.getElementById("panel");
var exitButton = document.getElementById("exitButton");
Fullscreen.debugMode(true);// Enables debug log
function main() {
// Handle change event
document.addEventListener("fullscreenchange",
function() {
var fse = document.fullscreenElement;
console.log("FULLSCREEN CHANGE: " +
((fse == null)? "(null)": "#" + fse.id));
});
// Handle error event
document.addEventListener("fullscreenerror",
function() { console.log("FULLSCREEN ERROR"); });
request1(); // This should be error
}
function request1() {
panel.requestFullscreen().then(function(){
console.log("request1 done.");
}).catch(function(err) {
console.error(err.message);
});
}
function request2() {
exitButton.requestFullscreen().then(function(){
console.log("request2 done.");
}).catch(function(err) {
console.error(err.message);
});
}
function exit() {
document.exitFullscreen()
.then(function(){
console.log("exit done.");
}).catch(function(err) {
console.error(err.message);
});
}
</script>
</body>
If this module was included by script tag, the global object 'Fullscreen'
is available (see the sample/sample.html
below).
sample/sample.html [live sample].
<body>
<button type="button"
onclick="requestFull();">Fullscreen</button>
<button type="button" id="exitButton"
style="display:none;"
onclick="exitFull();">Exit</button>
<script src="../fullscrn.js"></script>
<script>
function exitButton() {
return document.getElementById("exitButton");
}
function requestFull() {
var btn = exitButton();
btn.style.display = "block";
Fullscreen.request(btn);
}
function exitFull() {
var btn = exitButton();
btn.style.display = "none";
Fullscreen.exit();
}
</script>
</body>
This software is released under the MIT License, see LICENSE
FAQs
Fullscreen API
The npm package fullscrn receives a total of 210 weekly downloads. As such, fullscrn popularity was classified as not popular.
We found that fullscrn demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.