[BF4][v1.1.2] Ambient Light - Better Battlelog Forums #114514

Sitemap
Post edited 14 x times, last by
Topicstarter
Here is a plugin that tries to reduce the ambient light (in real life), while playing Battlefield 4.
The plugin focuses on the wlan controlled
Philips Hue Lights
. It can also darken
Battlelog
.
It is useful when you have Battlelog open on a second screen (like me).


Changelog
1.1.2
* fixed a bug where battlelog was not correctly brighten
* fixed a problem with the new Hue API
* some other code changes

1.1.1
* optimize the code
* optimize the 'darken battlelog' function
* fixed a bug where a new battle report was not indicated

1.1
* The Hue-Lights can now indicate a new available battle report
* fixed a bug where the game-status-bar was not darken
* some code changes

1.0.1
* some code optimizations

1.0
* initial version

Plugin Link:
https://docs.google.com/uc?export=download&id=0B92U9QpSX5jKSEVtckhTaDNkT2c


Philips Hue:
http://meethue.com/en-us/this-is-hue/an-introduction/



Google Translate
Interesting.

Some hints:

* Not use "localStorage", it will be flushed from battlelog sometimes. Use "instance.storage" instead.
* Not use "window.focus = " or something like that. It eleminates all prev. attached handlers. Use "$(window).on('focus', function(){});" instead.
* For ajax use "$.getJSON" or "$.ajax" instead of XMLHttpRequest" - Its cross browser safe.
Topicstarter
Thanks for your help.
Its my first try to do something in Javascript. I'll take a look at your hints tomorrow.
How to install ??
Post edited 2 x times, last by
Topicstarter
1. Open the BetterBattlelog Sidebar
2. Click on 'Plugins'
3. Copy and Paste this link (https://docs.google.com/uc?export=download&id=0B92U9QpSX5jKSEVtckhTaDNkT2c) into the textfield
4. Press Enter
5. Reload Battlelog (F5)

When you open now the Sidebar and scrolls down you should the some options for the Ambient Light Plugin.
nice feature :-D thats the future! good work :-)
Post edited 2 x times, last by
Could you upload it directly to a webspace so we can have a auto-updated version without the need of the customplugin space?


For now i uploaded it on my Dropbox to add it just with the URL
https://dl.dropboxusercontent.com/u/33225956/BBLog/plugins/ambient_light/ambient_light.js
Topicstarter
You can use my link i post above. It is always the latest version. You can add it also just with the URL.