@@ -406,8 +406,8 @@ var pcminer = (function () {
406406 '<span float="left">' + nrC + " committee records selected</span>" ;
407407 }
408408
409- // Updated decodeHtml function using DOMParser
410409 function decodeHtml ( html ) {
410+ html = html . replace ( "ø" , "o" ) ;
411411 const parser = new DOMParser ( ) ;
412412 const doc = parser . parseFromString ( html , "text/html" ) ;
413413 return doc . documentElement . textContent ;
@@ -427,7 +427,6 @@ var pcminer = (function () {
427427
428428 function nameStartsWith ( fullName , prefix ) {
429429 // Decode HTML entities (e.g. converting "ø" into "ø").
430- fullName = fullName . replace ( "ø" , "o" ) ;
431430 const decodedFullName = decodeHtml ( fullName ) ;
432431
433432 // Split the decoded name into words and filter out any empty strings.
@@ -461,11 +460,15 @@ var pcminer = (function () {
461460 clip . append ( "<p>" ) ;
462461 for ( var i = 0 ; i < list . length ; i ++ ) {
463462 var x = list [ i ] ;
464- if ( nameFilter == "" || nameStartsWith ( x . author , nameFilter ) ) {
463+ const author = x . author ;
464+ if (
465+ ( nameFilter == "" || nameStartsWith ( author , nameFilter ) ) &&
466+ ! excluded . has ( normalizeString ( decodeHtml ( author ) ) )
467+ ) {
465468 if ( nrPublicationsAndCommittees ( x ) > 0 && eval ( conditionFilter ) ) {
466469 // evil call to eval()
467- selector . append ( "<option>" + x . author + "</option>" ) ;
468- clip . append ( x . author + "," ) ; //REJ
470+ selector . append ( "<option>" + author + "</option>" ) ;
471+ clip . append ( author + "," ) ; //REJ
469472 for ( var j = 0 ; j < x . committees . length ; j ++ ) {
470473 clip . append (
471474 x . committees [ j ] . conference . series +
@@ -694,6 +697,14 @@ var pcminer = (function () {
694697 }
695698 }
696699
700+ var excluded = new Set ( ) ;
701+
702+ function updateExcluded ( input ) {
703+ const excludedList = input . split ( "\n" ) . map ( normalizeString ) ;
704+ excluded = new Set ( excludedList ) ;
705+ resetSelector ( ) ;
706+ }
707+
697708 function encodeForUrl ( input ) {
698709 // Decode HTML entities first
699710 const doc = new DOMParser ( ) . parseFromString ( input , "text/html" ) ;
@@ -934,6 +945,7 @@ var pcminer = (function () {
934945 confSelected : confSelected ,
935946 confsSelected : confsSelected ,
936947 copyToClipboard : copyToClipboard ,
948+ updateExcluded : updateExcluded ,
937949 main : main ,
938950 } ;
939951} ) ( ) ;
0 commit comments