diff src/sceditor.js @ 6:c26f7240e96b

fix emoticonsRoot
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 04 Aug 2022 20:05:05 -0600
parents b7725dab7482
children df1e18048d97
line wrap: on
line diff
--- a/src/sceditor.js	Thu Aug 04 19:27:37 2022 -0600
+++ b/src/sceditor.js	Thu Aug 04 20:05:05 2022 -0600
@@ -1,6 +1,9 @@
 (function () {
 	'use strict';
 
+	let baseUrl = document.currentScript.getAttribute('src').match(/.*\//)[0];
+	//console.log(baseUrl);
+
 	/**
 	 * Check if the passed argument is the
 	 * the passed type.
@@ -1404,7 +1407,7 @@
 		 *
 		 * @type {string}
 		 */
-		emoticonsRoot: '',
+		emoticonsRoot: baseUrl,
 		emoticons: {
 			dropdown: {
 				':)': 'emoticons/smile.png',