View Single Post
Old 12-05-2016, 01:17 PM   #1
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
Changing the store button

In f/w 5.4.x I was able to change the store button so it opens the web browser to my calibre server. Tried doing the same with 5.8.7 but no joy.The file and relevant code

Code:
/usr/share/webkit-1.0/pillow/javascripts/search_bar.js

        store: function() {
            nativeBridge.setLipcProperty(APP_MANAGER_ID, 'start', STORE_ID);
            nativeBridge.dismissChrome();
            nativeBridge.recordDeviceMetric("Pillow","Pillow" + getCurrentApp(),"store", 1, 0, METRIC_PRIORITY_LOW, METRIC_TYPE_COUNTER);
        },
modified

Code:
        store: function() {
            alert('yeah baby');
            // nativeBridge.setLipcProperty(APP_MANAGER_ID, 'start', STORE_ID);
            nativeBridge.setLipcProperty(APP_MANAGER_ID, "start", BROWSER_ID + '?view=' + encodeURIComponent("http://barty:8080"));
            nativeBridge.dismissChrome();
            // nativeBridge.recordDeviceMetric("Pillow","Pillow" + getCurrentApp(),"store", 1, 0, METRIC_PRIORITY_LOW, METRIC_TYPE_COUNTER);
        },
The alert never pops up.

Any ideas? Thanks in advance
Barty is offline   Reply With Quote