[BF4 Beta] Name Your Weapon - Better Battlelog Forums #112640

Sitemap
Post edited 8 x times, last by
Topicstarter
Edit: local storage does not persist through closing a window completely. What is the command to use BBLog storage, and why does using instance.t() only work up until the first space?

I saw this in CS:GO and I thought it was pretty neat. Here is a plugin that does the same(within battlelog only of course :( ) Spaces are allowed.
https://dl.dropboxusercontent.com/s/p60f4m3jz2d5pw5/weapon_name.js

You set the name in the weapon edit screen; there is also a reset button in case you want to get rid of the nick name.
Screen Shot
Screenshot 2013-12-19 12.45.25.png

Screen Shot
Screenshot 2013-12-19 12.41.08.png

Updates
Update Dec 20, 2013: Max amount of names set at 10 to avoid over using storage.
Post edited 1 x times, last by
If you want our help you might want to provide an unminified plugin.

But nice idea.
Topicstarter
Oh yeah. This one should be easier to read. If you want to test it remove www and replace it with dl.
https://www.dropbox.com/s/h8h55rk3giqmv7e/name_your_weapon.js
I do it like this in my plugins:
instance: null,
init: function (instance) {
this.instance = instance
this.domchange()
},
domchange: function () {
this.weaponName()
},


you can refer to the instance using this:
this.instance.storage("storagekey")
Topicstarter
So something like that? Also, what do you do about remove the storage?
Check out the example plugin that explains mostly all what you need.
Read carefully the code documentation in the example.

http://getbblog.com/plugins/example.js
GameFreakBoy wrote:
So something like that? Also, what do you do about remove the storage?


this.instance.storage("storagekey") = null or undefined.
Post edited 5 x times, last by
Ok