Skip to content

Commit

Permalink
ajuste de regras
Browse files Browse the repository at this point in the history
  • Loading branch information
altendorfme committed Jan 23, 2025
1 parent f1ac7d1 commit de345d2
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion app/data/domain_rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,37 @@ function checkPaywall() {
'fromGoogleBot' => true
],
'nytimes.com' => [
'idElementRemove' => ['gateway-content'],
'idElementRemove' => ['gateway-content','site-index'],
'customCode' => '
setTimeout(function() {
const walk = document.createTreeWalker(
document.body,
NodeFilter.SHOW_TEXT,
null,
false
);
let node;
while (node = walk.nextNode()) {
node.textContent = node.textContent
.replace(/’/g, "\\u2019") /* right single quotation */
.replace(/‘/g, "\\u2018") /* left single quotation */
.replace(/”/g, "\\u201D") /* right double quotation */
.replace(/“/g, "\\u201C") /* left double quotation */
.replace(/—/g, "\\u2014") /* em dash */
.replace(/–/g, "\\u2013") /* en dash */
.replace(/…/g, "\\u2026") /* horizontal ellipsis */
.replace(/•/g, "\\u2022") /* bullet */
.replace(/&/g, "&") /* ampersand */
.replace(/ /g, " ") /* non-breaking space */
.replace(/"/g, "\\"") /* quotation mark */
.replace(/'/g, "\'") /* apostrophe */
.replace(/&lt;/g, "<") /* less than */
.replace(/&gt;/g, ">") /* greater than */
.replace(/&agrave;/g, "\\u00E0") /* lowercase a with grave accent */
.replace(/&ntilde;/g, "\\u00F1"); /* lowercase n with tilde */
}
}, 3000);
',
'customStyle' => '
.vi-gateway-container {
position: inherit !important;
Expand Down

0 comments on commit de345d2

Please sign in to comment.