@@ -115,14 +115,14 @@ function RemoteFunctions(config = {}) {
115115
116116 /**
117117 * This is a checker function for editable elements, it makes sure that the element satisfies all the required checks
118- * - When onlyHighlight is false → config.isLPEditFeaturesActive must be true
119- * - When onlyHighlight is true → config.isLPEditFeaturesActive can be true or false (doesn't matter)
118+ * - When onlyHighlight is false → config.isProUser must be true
119+ * - When onlyHighlight is true → config.isProUser can be true or false (doesn't matter)
120120 * @param {DOMElement } element
121- * @param {boolean } [onlyHighlight=false] - If true, bypasses the isLPEditFeaturesActive check
121+ * @param {boolean } [onlyHighlight=false] - If true, bypasses the isProUser check
122122 * @returns {boolean } - True if the element is editable else false
123123 */
124124 function isElementEditable ( element , onlyHighlight = false ) {
125- if ( ! config . isLPEditFeaturesActive && ! onlyHighlight ) {
125+ if ( ! config . isProUser && ! onlyHighlight ) {
126126 return false ;
127127 }
128128
@@ -1327,7 +1327,7 @@ function RemoteFunctions(config = {}) {
13271327 create : function ( ) {
13281328 this . remove ( ) ; // remove existing box if already present
13291329
1330- if ( ! config . isLPEditFeaturesActive ) {
1330+ if ( ! config . isProUser ) {
13311331 return ;
13321332 }
13331333
@@ -1502,7 +1502,7 @@ function RemoteFunctions(config = {}) {
15021502
15031503 // get the ID and classes for that element, as we need to display it in the box
15041504 const id = this . element . id ;
1505- const classes = this . element . className ? this . element . className . split ( / \s + / ) . filter ( Boolean ) : [ ] ;
1505+ const classes = Array . from ( this . element . classList || [ ] ) ;
15061506
15071507 let content = "" ; // this will hold the main content that will be displayed
15081508 content += "<div class='tag-name'>" + this . element . tagName . toLowerCase ( ) + "</div>" ; // add element tag name
@@ -1574,7 +1574,7 @@ function RemoteFunctions(config = {}) {
15741574 create : function ( ) {
15751575 this . remove ( ) ; // remove existing box if already present
15761576
1577- if ( ! config . isLPEditFeaturesActive ) {
1577+ if ( ! config . isProUser ) {
15781578 return ;
15791579 }
15801580
@@ -2836,7 +2836,7 @@ function RemoteFunctions(config = {}) {
28362836 var oldConfig = config ;
28372837 config = JSON . parse ( newConfig ) ;
28382838
2839- if ( config . highlight || ( config . isLPEditFeaturesActive && shouldShowHighlightOnHover ( ) ) ) {
2839+ if ( config . highlight || ( config . isProUser && shouldShowHighlightOnHover ( ) ) ) {
28402840 // Add hover event listeners if highlight is enabled OR editHighlights is set to hover
28412841 window . document . removeEventListener ( "mouseover" , onElementHover ) ;
28422842 window . document . removeEventListener ( "mouseout" , onElementHoverOut ) ;
@@ -2881,7 +2881,7 @@ function RemoteFunctions(config = {}) {
28812881 }
28822882
28832883 // Re-setup event listeners based on new mode to ensure proper behavior
2884- if ( config . highlight && config . isLPEditFeaturesActive ) {
2884+ if ( config . highlight && config . isProUser ) {
28852885 window . document . removeEventListener ( "mouseover" , onElementHover ) ;
28862886 window . document . removeEventListener ( "mouseout" , onElementHoverOut ) ;
28872887 window . document . addEventListener ( "mouseover" , onElementHover ) ;
@@ -3092,7 +3092,7 @@ function RemoteFunctions(config = {}) {
30923092 window . document . removeEventListener ( "dragleave" , onDragLeave ) ;
30933093 window . document . removeEventListener ( "keydown" , onKeyDown ) ;
30943094
3095- if ( config . isLPEditFeaturesActive ) {
3095+ if ( config . isProUser ) {
30963096 // Initialize hover highlight with Chrome-like colors
30973097 _hoverHighlight = new Highlight ( "#c8f9c5" , true ) ; // Green similar to Chrome's padding color
30983098
0 commit comments