Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ng-browser-update
Advanced tools
Changelog
1.1.0 (2016-03-05)
isolate scope binding definition of attribute 'notification-text' has changed from two-way binding to one-way binding
To migrate the code follow the example below:
Before:
(with hardcoded value)
<browser-update
notification-text="'This is my custom notification message'">
</browser-update>
(with scope value)
<browser-update
notification-text="valueFromScope">
</browser-update>
After:
(with hardcoded value)
<browser-update
notification-text="This is my custom notification message">
</browser-update>
(with scope value)
<browser-update
notification-text="{{valueFromScope}}">
</browser-update>
This allows you to use, for example, angular-translate's translate filter, to easily translate the custom message that appears in the notification bar, as such:
<browser-update
notification-text="{{ 'CUSTOM_NOTIFICATION_MESSAGE_ID' | translate }}">
</browser-update>
closes #1 (d7a68ca4)
<a name="1.0.1"></a>
Readme
AngularJS directive for Browser-Update.org: out-dated browsers notifier.
Demo: http://tinesoft.github.io/ng-browser-update
Using bower:
bower install ng-browser-update
Using npm:
npm install ng-browser-update
You should already angular script referenced. If not, add it:
<script type="text/javascript" src="angular.min.js"></script>
Then add the library:
<script type="text/javascript" src="ng-browser-update.min.js"></script>
Next, inject ngBrowserUpdate
in your application module:
angular.module('myApp', ['ngBrowserUpdate']);
and then just add an browser-update
tag in your main file (index.html for example):
<browser-update></browser-update>
versions
: browser versions to notifylanguage
: set a language for the message, e.g. "en", overrides the default detectionreminder
: atfer how many hours should the message reappear: 0 = show all the timenew-window
: open link in new window/tabalways-show-bar
: always show the bar (for testing)notification-text
: custom notification html text (takes precedence over the 'language' option)on-notification-bar-shown
: callback function after the bar has appearedon-notificationBar-clicked
: callback function if bar was clickedExample with some above features:
<browser-update
versions="{i:8,f:8,o:9.63,s:2,c:8}" reminder="1"
always-show-bar="false" new-window="false"
notification-text="This is my custom notification message">
</browser-update>
Version v1.1 of ng-browser-update makes it possible to use angular's expressions as value for the notification-text
attribute.
This allows you to use, for example, angular-translate's translate
filter, to easily translate the custom message that appears in the notification bar.
Here is an example:
<browser-update
versions="{i:8,f:8,o:9.63,s:2,c:8}" reminder="1"
always-show-bar="false" new-window="false"
notification-text="{{ 'CUSTOM_NOTIFICATION_MESSAGE_ID' | translate }}">
</browser-update>
where CUSTOM_NOTIFICATION_MESSAGE_ID is the key of the message.
More information on how to use angular-translate's translate
filter can be found here.
onNotificationClosed
: callback when user closes the notification barYou can run the tests by cloning the repo and then (inside the project folder) running
npm install
bower install
grunt watch
assuming you already have grunt
installed, otherwise you also need to do:
npm install -g grunt-cli
Copyright (c) 2015 Tine Kondo. Licensed under the MIT License (MIT)
Credits and thanks go to the team behind Browser-Update.org for this awesome initiative!
FAQs
AngularJS directive for Browser-Update.org (http://browser-update.org): out-dated browsers notifier
The npm package ng-browser-update receives a total of 9,714 weekly downloads. As such, ng-browser-update popularity was classified as popular.
We found that ng-browser-update 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.