uniques: extract highlighter
This commit is contained in:
@ -329,7 +329,8 @@ window.plugin.uniques.loadLocal = function(mapping) {
|
||||
/***************************************************************************************************************************************************************/
|
||||
/** HIGHLIGHTER ************************************************************************************************************************************************/
|
||||
/***************************************************************************************************************************************************************/
|
||||
window.plugin.uniques.highlight = function(data) {
|
||||
window.plugin.uniques.highlighter = {
|
||||
highlight: function(data) {
|
||||
var guid = data.portal.options.ent[0];
|
||||
var uniqueInfo = window.plugin.uniques.uniques[guid];
|
||||
|
||||
@ -355,11 +356,11 @@ window.plugin.uniques.highlight = function(data) {
|
||||
}
|
||||
|
||||
data.portal.setStyle(style);
|
||||
}
|
||||
},
|
||||
|
||||
// Called by IITC when the selected highlighter changes. Must not be renamed
|
||||
window.plugin.uniques.setSelected = function(active) {
|
||||
setSelected: function(active) {
|
||||
window.plugin.uniques.isHighlightActive = active;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -389,7 +390,7 @@ var setup = function() {
|
||||
window.addHook('portalDetailsUpdated', window.plugin.uniques.onPortalDetailsUpdated);
|
||||
window.addHook('publicChatDataAvailable', window.plugin.uniques.onPublicChatDataAvailable);
|
||||
window.addHook('iitcLoaded', window.plugin.uniques.registerFieldForSyncing);
|
||||
window.addPortalHighlighter('Uniques', window.plugin.uniques);
|
||||
window.addPortalHighlighter('Uniques', window.plugin.uniques.highlighter);
|
||||
}
|
||||
|
||||
//PLUGIN END //////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user