Commit b27b129 1 parent e1221e9 commit b27b129 Copy full SHA for b27b129
File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1485,12 +1485,27 @@ export async function addEmailToTrustedList(email) {
1485
1485
$ ( "input[type='submit'][value='Add this Person']" ) . trigger ( "click" ) ;
1486
1486
}
1487
1487
1488
+ // Remove email from Trusted List
1489
+ export async function removeEmailFromTrustedList ( email ) {
1490
+ const theLink = $ ( "a:contains('" + email + "')" ) ;
1491
+ const checkbox = theLink . closest ( "tr" ) . find ( "input[type='checkbox']" ) ;
1492
+ checkbox . prop ( "checked" , true ) ;
1493
+ $ ( "input[type='submit'][value='Remove Selected People']" ) . trigger ( "click" ) ;
1494
+ }
1495
+
1488
1496
if ( window . location . href . includes ( "TrustedList" ) && window . location . href . includes ( "AddEmail" ) ) {
1489
1497
// Get email from the URL
1490
1498
const email = new URLSearchParams ( window . location . search ) . get ( "AddEmail" ) ;
1491
1499
if ( email ) {
1492
1500
addEmailToTrustedList ( email ) ;
1493
1501
}
1494
1502
}
1503
+ if ( window . location . href . includes ( "TrustedList" ) && window . location . href . includes ( "RemoveEmail" ) ) {
1504
+ // Get email from the URL
1505
+ const email = new URLSearchParams ( window . location . search ) . get ( "RemoveEmail" ) ;
1506
+ if ( email ) {
1507
+ removeEmailFromTrustedList ( email ) ;
1508
+ }
1509
+ }
1495
1510
1496
1511
////////// End of Notables Project things
You can’t perform that action at this time.
0 commit comments