Merge branch 'actionbarhighlighter' of git://github.com/fkloft/ingress-intel-total-conversion into fkloft-actionbarhighlighter
This commit is contained in:
@ -6,19 +6,37 @@ window._highlighters = null;
|
||||
window._current_highlighter = localStorage.portal_highlighter;
|
||||
window._no_highlighter = 'No Highlights';
|
||||
|
||||
if(window._current_highlighter !== undefined) {
|
||||
if (typeof android !== 'undefined' && android && android.setActiveHighlighter)
|
||||
android.setActiveHighlighter(window._current_highlighter);
|
||||
}
|
||||
|
||||
|
||||
window.addPortalHighlighter = function(name, callback) {
|
||||
if(_highlighters === null) {
|
||||
_highlighters = {};
|
||||
}
|
||||
_highlighters[name] = callback;
|
||||
|
||||
if (typeof android !== 'undefined' && android && android.addPortalHighlighter)
|
||||
android.addPortalHighlighter(name);
|
||||
|
||||
if(localStorage.portal_highlighter === undefined) {
|
||||
_current_highlighter = name;
|
||||
if (typeof android !== 'undefined' && android && android.setActiveHighlighter)
|
||||
android.setActiveHighlighter(name);
|
||||
|
||||
localStorage.portal_highlighter = name;
|
||||
}
|
||||
portalHighlighterControl();
|
||||
}
|
||||
|
||||
window.portalHighlighterControl = function() {
|
||||
if (typeof android !== 'undefined' && android && android.addPortalHighlighter) {
|
||||
$('#portal_highlight_select').remove();
|
||||
return;
|
||||
}
|
||||
|
||||
if(_highlighters !== null) {
|
||||
if($('#portal_highlight_select').length === 0) {
|
||||
$("body").append("<select id='portal_highlight_select'></select>");
|
||||
@ -39,6 +57,8 @@ window.portalHighlighterControl = function() {
|
||||
|
||||
window.changePortalHighlights = function(name) {
|
||||
_current_highlighter = name;
|
||||
if (typeof android !== 'undefined' && android && android.setActiveHighlighter)
|
||||
android.setActiveHighlighter(name);
|
||||
resetHighlightedPortals();
|
||||
localStorage.portal_highlighter = name;
|
||||
}
|
||||
|
Reference in New Issue
Block a user