in src/main/resources/static/gr-imagare-inline.js [104:128]
_getAccountPrefs() {
return this.plugin.restApi('/accounts/self/imagare~preference')
.get('')
.then(prefs => {
if (!prefs || !prefs.link_decoration) {
this._link_decoration = LINK_DECORATIONS.NONE;
this._pattern = '.*';
} else {
this._link_decoration = LINK_DECORATIONS[prefs.link_decoration.toUpperCase()];
this._pattern = prefs.pattern || '.*';
}
switch (this._link_decoration) {
case LINK_DECORATIONS.INLINE:
this._decorator_fn = this._insertImage.bind(this);
break;
case LINK_DECORATIONS.TOOLTIP:
this._decorator_fn = this._addTooltip.bind(this);
break;
case LINK_DECORATIONS.NONE:
default:
this._decorator_fn = () => {};
}
});
},