
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
ember-fullscreen
Advanced tools
Fullscreen API packaged as an Ember service.
ember-fullscreen uses Screenfull for the all the Fullscreen API calls. This means that ember-fullscreen will work on every browser that supports fullscreen API/screenfull: http://caniuse.com/fullscreen
Check minimal demo.
ember-fullscreen is an ember-cli addon. Just run the install command on your ember-cli project:
ember install ember-fullscreen
For more information on using ember-cli, visit http://www.ember-cli.com/.
Inject the service anywhere you need it by adding fullscreen: Ember.inject.service()
. The fullscreen service has the following properties and methods:
.isAvailable
- A boolean that represents whether you are allowed to enter fullscreen.
.isEnabled
- A boolean that represents whether you are in fullscreen mode.
.enable()
- Enters fullscreen mode. Accepts a DOM element. Default is <html>
. If called with another element than the currently active, it will switch to that if it's a decendant. Yes, you can make DOM elements fullscreen.
.disable()
- Disables fullscreen mode.
.toggle()
- Enables fullscreen mode if not active, disables if active. Also accepts an optional DOM element.
.on('error', ...)
- Fullscreen service includes Ember.Evented mixin. When a fullscreen request fails, ember-fullscreen triggers an error
event.
.on('fullscreenChange', ...)
- When the fullscreen state changes, ember-fullscreen notifies the new isEnabled
state.
Create a button in your controller with an action that toggles fullscreen mode:
export default Controller.extend({
fullscreen: service(),
actions: {
toggleFullscreen() {
this.get('fullscreen').toggle();
}
}
});
Use it on your templates to conditionally render depending on a boolean:
{{#if fullscreen.isEnabled}}
I'm fullscreen
{{else}}
I'm NOT fullscreen
{{/if}}
Only display a button to enter fullscreen if the browser supports it:
{{#if fullscreen.isAvailable}}
<button onclick={{action "toggleFullscreen"}}>
Toggle fullscreen
</button>
{{/if}}
A simple component that sets its own element to fullscreen on click:
export default Component.extend({
fullscreen: service(),
click() {
this.get('fullscreen').toggle(this.element);
}
});
Bind an icon class depending on wether we're in fullscreen:
{{!-- Uses font-awesome --}}
<i class="{{if fullscreen.isEnabled "fa-compress" "fa-expand"}}"></i>
FAQs
Fullscreen API packaged as an Ember service.
We found that ember-fullscreen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.