@@ -709,7 +709,7 @@ var link = (function(){
709709} ) ;
710710
711711groupHeader . appendChild ( groupHeaderItemControl ) ;
712- if ( stagedGroup . group . name . show && helper . checkValueString ( stagedGroup . group . name . text ) ) {
712+ if ( stagedGroup . group . name . show && helper . checkIfValidString ( stagedGroup . group . name . text ) ) {
713713helper . addClass ( groupHeader , "group-header-name" ) ;
714714groupHeader . appendChild ( groupHeaderItemName ) ;
715715} ;
@@ -916,7 +916,7 @@ var link = (function(){
916916value : "link-item"
917917} ]
918918} ;
919- if ( stagedLink . link . accent . by == "custom" || stagedLink . link . color . by == "custom" || helper . checkValueString ( stagedLink . link . image ) ) {
919+ if ( stagedLink . link . accent . by == "custom" || stagedLink . link . color . by == "custom" || helper . checkIfValidString ( stagedLink . link . image ) ) {
920920linkItemOptions . attr . push ( {
921921key : "style" ,
922922value : ""
@@ -940,7 +940,7 @@ var link = (function(){
940940"--link-item-color: " + stagedLink . link . color . rgb . r + ", " + stagedLink . link . color . rgb . g + ", " + stagedLink . link . color . rgb . b + "" +
941941"--link-item-color-focus-hover: " + stagedLink . link . color . rgb . r + ", " + stagedLink . link . color . rgb . g + ", " + stagedLink . link . color . rgb . b + "" ;
942942} ;
943- if ( helper . checkValueString ( stagedLink . link . image ) ) {
943+ if ( helper . checkIfValidString ( stagedLink . link . image ) ) {
944944linkItemOptions . attr [ 1 ] . value = linkItemOptions . attr [ 1 ] . value + "--link-image-url: url(" + helper . trimString ( stagedLink . link . image ) + ");"
945945} ;
946946} ;
@@ -999,7 +999,7 @@ var link = (function(){
999999} ;
10001000
10011001var linkDisplayName ;
1002- if ( helper . checkValueString ( stagedLink . link . name ) ) {
1002+ if ( helper . checkIfValidString ( stagedLink . link . name ) ) {
10031003linkDisplayName = helper . node ( "p:" + helper . trimString ( stagedLink . link . name ) + "|class:link-display-name" ) ;
10041004} else {
10051005linkDisplayName = helper . node ( "p|class:link-display-name" ) ;
@@ -1045,11 +1045,11 @@ var link = (function(){
10451045linkDisplay . appendChild ( linkDisplayVisual ) ;
10461046} ;
10471047
1048- if ( helper . checkValueString ( stagedLink . link . name ) ) {
1048+ if ( helper . checkIfValidString ( stagedLink . link . name ) ) {
10491049linkDisplay . appendChild ( linkDisplayName ) ;
10501050} ;
10511051
1052- if ( helper . checkValueString ( stagedLink . link . image ) ) {
1052+ if ( helper . checkIfValidString ( stagedLink . link . image ) ) {
10531053linkPanelFront . appendChild ( linkImage ) ;
10541054} ;
10551055linkPanelFront . appendChild ( linkDisplay ) ;
@@ -1556,10 +1556,10 @@ var link = (function(){
15561556if ( bookmarks . get ( ) . length > 0 ) {
15571557bookmarks . get ( ) . forEach ( function ( arrayItem , index ) {
15581558var name ;
1559- if ( arrayItem . name . text == null || arrayItem . name . text == "" ) {
1560- name = "Unnamed group " + ( index + 1 ) ;
1561- } else {
1559+ if ( helper . checkIfValidString ( arrayItem . name . text ) ) {
15621560name = arrayItem . name . text ;
1561+ } else {
1562+ name = "Unnamed group " + ( index + 1 ) ;
15631563} ;
15641564var option = helper . makeNode ( {
15651565tag : "option" ,
@@ -2900,7 +2900,7 @@ var link = (function(){
29002900useStagedLink : true
29012901} ) ;
29022902var heading ;
2903- if ( helper . checkValueString ( stagedLink . link . name ) ) {
2903+ if ( helper . checkIfValidString ( stagedLink . link . name ) ) {
29042904heading = "Edit " + stagedLink . link . name ;
29052905} else {
29062906heading = "Edit unnamed bookmark" ;
@@ -2954,10 +2954,10 @@ var link = (function(){
29542954useStagedGroup : true
29552955} ) ;
29562956var heading ;
2957- if ( stagedGroup . group . name . text == null || stagedGroup . group . name . text == "" ) {
2958- heading = "Edit unnamed group " + ( stagedGroup . position . origin + 1 ) ;
2959- } else {
2957+ if ( helper . checkIfValidString ( stagedGroup . group . name . text ) ) {
29602958heading = "Edit " + stagedGroup . group . name . text ;
2959+ } else {
2960+ heading = "Edit unnamed group " + ( stagedGroup . position . origin + 1 ) ;
29612961} ;
29622962var successAction = function ( ) {
29632963var copyStagedGroup = JSON . parse ( JSON . stringify ( stagedGroup ) ) ;
@@ -3005,7 +3005,7 @@ var link = (function(){
30053005stagedLink . link = JSON . parse ( JSON . stringify ( copyStagedLink . link ) ) ;
30063006stagedLink . position = JSON . parse ( JSON . stringify ( copyStagedLink . position ) ) ;
30073007var heading ;
3008- if ( helper . checkValueString ( stagedLink . link . name ) ) {
3008+ if ( helper . checkIfValidString ( stagedLink . link . name ) ) {
30093009heading = "Remove " + stagedLink . link . name ;
30103010} else {
30113011heading = "Remove unnamed bookmark" ;
@@ -3052,10 +3052,10 @@ var link = (function(){
30523052stagedGroup . group = JSON . parse ( JSON . stringify ( copyStagedGroup . group ) ) ;
30533053stagedGroup . position = JSON . parse ( JSON . stringify ( copyStagedGroup . position ) ) ;
30543054var heading ;
3055- if ( stagedGroup . group . name . text == null || stagedGroup . group . name . text == "" ) {
3056- heading = "Remove unnamed group " + ( stagedGroup . position . origin + 1 ) ;
3057- } else {
3055+ if ( helper . checkIfValidString ( stagedGroup . group . name . text ) ) {
30583056heading = "Remove " + stagedGroup . group . name . text ;
3057+ } else {
3058+ heading = "Remove unnamed group " + ( stagedGroup . position . origin + 1 ) ;
30593059} ;
30603060var successAction = function ( ) {
30613061var copyStagedGroup = JSON . parse ( JSON . stringify ( stagedGroup ) ) ;
0 commit comments