mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
19 lines
316 B
JavaScript
19 lines
316 B
JavaScript
var highlighters = {};
|
|
|
|
module.exports = {
|
|
id: function(id)
|
|
{
|
|
var prefix = 'highlighter_';
|
|
return id.indexOf(prefix) == 0 ? id : prefix + id;
|
|
},
|
|
|
|
get: function(id)
|
|
{
|
|
return highlighters[this.id(id)];
|
|
},
|
|
|
|
set: function(id, highlighter)
|
|
{
|
|
highlighters[this.id(id)] = highlighter;
|
|
}
|
|
}; |