View Single Post
Old 01-22-2014, 09:53 PM   #6
Barty
doofus
Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.
 
Barty's Avatar
 
Posts: 2,552
Karma: 13089041
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
ok, I figured out a couple of things

1/ it should be

Code:
nativeBridge.setIntLipcProperty("com.lab126.cmd", "wirelessEnable", 0);
(duh)

2/ changing

Code:
discovery: function () { 
  ... 
}
only affects the goodreads button in the home screen.

I still don't know what badge does.

anyway, this is what I ended up doing

Code:
        store: function () {
            /*
            // original
            nativeBridge.setLipcProperty(M, "start", V);
            */
            if (nativeBridge.getIntLipcProperty("com.lab126.cmd", "wirelessEnable")!=0) {
                nativeBridge.setIntLipcProperty("com.lab126.cmd", "wirelessEnable", 0);
            } else {
                nativeBridge.setLipcProperty(M, "start", B);
            }
            nativeBridge.dismissChrome();
        },
this changes store button to turn off wifi if it is on and open store if wifi is off.

I should mention this is PW2 5.4.2. the code is minified and obfuscated. I used http://jsbeautifier.org/ to make it readable. seems to work with no adverse effects.
Barty is offline   Reply With Quote