annotate src/icons/famfamfam.js @ 9:9159df67520a

remove "icons" option
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 07 Aug 2022 00:19:52 -0600
parents
children 8d32537e0ca7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
9159df67520a remove "icons" option
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 (function (document, sceditor) {
9159df67520a remove "icons" option
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 'use strict';
9159df67520a remove "icons" option
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3
9159df67520a remove "icons" option
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 let baseUrl = document.currentScript.getAttribute('src').match(/.*\//)[0];
9159df67520a remove "icons" option
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5
9159df67520a remove "icons" option
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 sceditor.icons.fn = function() {
9159df67520a remove "icons" option
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 let cssUrl = baseUrl + 'famfamfam/famfamfam.css';
9159df67520a remove "icons" option
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 let html = '<style>@import "' + cssUrl + '";</style>';
9159df67520a remove "icons" option
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 document.head.insertAdjacentHTML('beforeend',html);
9159df67520a remove "icons" option
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 return {};
9159df67520a remove "icons" option
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 };
9159df67520a remove "icons" option
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 })(document, sceditor);