Created
November 15, 2017 02:19
-
-
Save gunesacar/5ac586dfeb2b2d6edfe569f8defc0fe9 to your computer and use it in GitHub Desktop.
The redaction rules used on the fidelity.com website to exclude elements from Clicktale session recording.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var textOnlySelector = ".billpay-table .acc-no, .accounts-overview-table | |
.account-name, .message-field--confirmation-number,.account-name, | |
.review-order-details, .trade-preview-content .message--content"; // | |
FDLTY-46 | |
textOnlySelector += ", #myprofile-page .profile-user span, | |
#myprofile-page .syn-data-container div:not(.row) span"; // FDLTY-59 | |
textOnlySelector += ", #perfTypeTbl .nav-menu div.normal, #perfTypeTbl | |
.nav-menu a"; // FDLTY-57 | |
textOnlySelector += ", form[name=\"initForm\"] td.SmallData, | |
form[name=\"initForm\"] tr td.Text:nth-child(2)"; // FDLTY-60 | |
textOnlySelector += ", .accounts--table .accounts--info | |
td.accounts--table-first-col h3, .accounts--table .accounts--info | |
td.accounts--table-first-col span"; // FDLTY-67 | |
// FDLTY-69 | |
textOnlySelector += ", .initiator-page .accordion-item--header.first h3, | |
.initiator-page .accordion-item--header.first li"; | |
textOnlySelector += ", .initiator-page select#rolloverAccountList option"; | |
textOnlySelector += ", .initiator-page .accordion-post-ao-step | |
.accordion-item--header li:first-child"; | |
// FDLTY-82 | |
textOnlySelector += ", .initiator-page .accordion-item | |
form[name=\"AOForm\"] .readback-account-number | |
.readonly-values--container p"; | |
// FDLTY-68 margin / option | |
textOnlySelector += ", | |
form[name=\"employmentInfoForm\"]>table:last-child>tbody>tr>td>table:first-child>tbody>tr>td>table>tbody>tr>td>table>tbody>tr>td>table>tbody>tr:nth-child(2) | |
td"; // mandoCheck | |
textOnlySelector += ", | |
form[name=\"employmentInfoForm\"]>table:last-child>tbody>tr>td>table[title*=\"Error\"]+img+table>tbody>tr>td>table>tbody>tr>td>table>tbody>tr>td>table>tbody>tr:nth-child(2) | |
td"; // emlploymant info error messages | |
textOnlySelector += ", | |
form[name=\"financialInfoForm\"]>table:last-child>tbody>tr>td>table:first-child>tbody>tr>td>table>tbody>tr>td>table>tbody>tr>td>table>tbody>tr:nth-child(3) | |
td"; // employmentInfo | |
var nthArr = [4, 5, 7]; | |
for (var i = 0; i < nthArr.length; i++) { | |
textOnlySelector += ", | |
form[name=\"agreementForm\"]>table:last-child>tbody>tr>td>table:last-child>tbody>tr>td>table>tbody>tr:first-child>td>table>tbody>tr:nth-child(" | |
+ nthArr[i] + ") td.vData"; // financialInfo | |
} | |
textOnlySelector += ", form[name=\"agreementForm\"] p"; // thank you | |
textOnlySelector += ", | |
form[name=\"investmentExperianceForm\"]>table:last-child>tbody>tr>td>table:first-child>tbody>tr>td>table>tbody>tr>td>table>tbody>tr>td>table>tbody>tr:nth-child(2) | |
td"; // financialInfo version 2 | |
textOnlySelector += ", | |
form[name=\"personalInfoForm\"]>table:last-child>tbody>tr>td>table:first-child>tbody>tr>td>table>tbody>tr>td>table>tbody>tr>td>table>tbody>tr:nth-child(2) | |
td"; // personal info | |
textOnlySelector += ", | |
form[name=\"personalInfoForm\"]>table:last-child>tbody>tr>td>table[title*=\"Error\"]+img+table>tbody>tr>td>table>tbody>tr>td>table>tbody>tr>td>table>tbody>tr:nth-child(2) | |
td"; // personal info error messages | |
textOnlySelector += ", .qt-confirm-modal | |
.card-block--order-received-with-p" //FDLTY-377 | |
textOnlySelector += ", | |
.base-popup--content.card-block--order-received-with-p p, | |
.card-block.card-block-tight-padding div.font-size-80";//FDLTY-378 | |
var textAndValueSelector = "form#formPerfFor select option"; // FDLTY-57 | |
textAndValueSelector += ", form[name=\"LoaInitForm\"] input, | |
form[name=\"LoaInitForm\"] select option"; // FDLTY-69 | |
textAndValueSelector += ", select#dtt--account-dropdown option" // | |
FDLTY-84 account dropdown | |
// FDLTY-84 | |
var PGCSelector = "table#accountsTable td.account-table-header, | |
table#accountsTable td.account-table-header span"; // accounts & income | |
PGCSelector += ", #timeHorizonPanelDiv .retireHeaderContent, | |
#timeHorizonPanelDiv .retireHeaderContent span, #timeHorizonPanelDiv | |
.retirement-user-name span"; // time horizon | |
PGCSelector += ", #retirePersonalInfoDiv .ire-pi-customer-div dd, | |
#retirePersonalInfoDiv .ire-pi-partner-div dd"; // personal information | |
PGCSelector += ", #tabs .accountNameDiv span, #tabs .accountName span"; | |
// asset mix + saving rate | |
PGCSelector += ", p.income-group--datatable--owner--line2"; // | |
additional income sources | |
PGCSelector += ", .ss-spouse-panel, .ss-name-p"; // social security | |
window.ClickTaleSettings.PTC.RulesObj = [{ | |
selector: "input[type=\"text\"], input[type=\"tel\"], | |
input[type=\"email\"]", | |
changeMon: { | |
Attributes: ['value'], | |
Text: false | |
}, | |
rewriteApi: { | |
Attributes: ['value'], | |
Text: false | |
} | |
}, | |
{ | |
selector: "iframe[src*=\"fidelity.com\"], #hiddenDownloader", | |
changeMon: { | |
Attributes: ['src'], | |
Text: false | |
}, | |
rewriteApi: { | |
Attributes: ['src'], | |
Text: false | |
} | |
}, | |
{ | |
selector: textOnlySelector, | |
changeMon: { | |
Attributes: false, | |
Text: true | |
}, | |
rewriteApi: { | |
Attributes: false, | |
Text: true | |
} | |
}, | |
{ | |
selector: textAndValueSelector, | |
changeMon: { | |
Attributes: ['value'], | |
Text: true | |
}, | |
rewriteApi: { | |
Attributes: ['value'], | |
Text: true | |
} | |
}, | |
{ // FDLTY-83 Authorized Access page | |
selector: "td.DataTableTitle", | |
changeMon: { | |
Attributes: false, | |
Text: true | |
}, | |
rewriteApi: { | |
Attributes: false, | |
Text: true | |
}, | |
location: { | |
prop: 'pathname', | |
search: /ftgw\/authaccess\/authapp\/authAccess/i | |
} | |
}, | |
{ // FDLTY-84 PGC | |
selector: PGCSelector, | |
changeMon: { | |
Attributes: false, | |
Text: true | |
}, | |
rewriteApi: { | |
Attributes: false, | |
Text: true | |
}, | |
location: { | |
prop: 'pathname', | |
search: /ftgw\/tools\/customer\/navBasicIncomeProjections.go/i | |
} | |
}, | |
{ // FDLTY-129 | |
selector: "#qt-account option, .singleAccountName", | |
changeMon: { | |
Attributes: false, | |
Text: true | |
}, | |
rewriteApi: { | |
Attributes: false, | |
Text: true | |
}, | |
location: { | |
prop: 'hostname', | |
search: /fidelity.com/i | |
} | |
}, | |
{ // FDLTY-129 | |
selector: "#qt-account option", | |
changeMon: { | |
Attributes: ['value'], | |
Text: false | |
}, | |
rewriteApi: { | |
Attributes: ['value'], | |
Text: false | |
}, | |
location: { | |
prop: 'hostname', | |
search: /fidelity.com/i | |
} | |
}, | |
{ // FDLTY-129 | |
selector: "#full-Name, #email-address", | |
changeMon: { | |
Attributes: ['value'], | |
Text: false | |
}, | |
rewriteApi: { | |
Attributes: ['value'], | |
Text: false | |
}, | |
location: { | |
prop: 'pathname', | |
search: /RFI\/signup\/ATPeNews/i | |
} | |
}, | |
{ // FDLTY-162 | |
selector: "[data-pii='true'], [data-pii='yes'], .pii, | |
[data-pii='true'] option, [name=\"listName\"] option", | |
changeMon: { | |
Attributes: false, | |
Text: true | |
}, | |
rewriteApi: { | |
Attributes: false, | |
Text: true | |
}, | |
location: { | |
prop: 'hostname', | |
search: /fidelity.com/i | |
} | |
}, | |
{ // FDLTY-162 | |
selector: "[data-pii='true'] option", | |
changeMon: { | |
Attributes: ['label'], | |
Text: false | |
}, | |
rewriteApi: { | |
Attributes: ['label'], | |
Text: false | |
}, | |
location: { | |
prop: 'hostname', | |
search: /fidelity.com/i | |
} | |
}, { | |
selector: ".ctHidden", | |
changeMon: { | |
Attributes: ['value'], | |
Text: true | |
}, | |
rewriteApi: { | |
Attributes: ['value'], | |
Text: true | |
} | |
}, { // from pid197: | |
// FDLTY-129 | |
selector: '[data-pii ="true"], [data-pii ="yes"], .pii, [data-pii | |
="true"] option', | |
changeMon: { | |
Attributes: ['value', 'aria-labelledby'], | |
Text: true | |
}, | |
rewriteApi: { | |
Attributes: ['value', 'aria-labelledby'], | |
Text: true | |
} | |
}, { // FDLTY-430 | |
selector: '[data-account-number]', | |
changeMon: { | |
Attributes: ['data-account-number'], | |
Text: true | |
}, | |
rewriteApi: { | |
Attributes: ['data-account-number'], | |
Text: true | |
} | |
} | |
]; | |
window.ClickTaleSettings.PTC.RulesObjRemoveEls = [ | |
{ | |
changeMonLive: '.ctExcludeCM, svg, img[src^="data"], rmd-table | |
tbody' | |
}, | |
{ | |
changeMonLive: '.projections--container', | |
location: { | |
prop: 'pathname', | |
search: /dpcs\/dma/i | |
} | |
}, | |
{ | |
changeMonLive: '.market-monitor', | |
location: { | |
prop: 'href', | |
search: /brokerage.fidelity.com\/ftgw\/brkg\/watchlist/i | |
} | |
}]; | |
(function () { | |
if (typeof window.ClickTalePIISelector === 'string' && | |
window.ClickTalePIISelector != '') { | |
try { | |
var domNodes = | |
document.querySelectorAll(window.ClickTalePIISelector); | |
if (domNodes) { | |
window.ClickTaleSettings.PTC.RulesObj.push({ | |
selector: window.ClickTalePIISelector, | |
changeMon: { | |
Attributes: ['value'], | |
Text: true | |
}, | |
rewriteApi: { | |
Attributes: ['value'], | |
Text: true | |
} | |
}); | |
} | |
} | |
catch (err) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment