From de345d2eca9ead47361309b90f3bf33e61e56bee Mon Sep 17 00:00:00 2001 From: Renan Bernordi Date: Thu, 23 Jan 2025 17:32:16 -0300 Subject: [PATCH] ajuste de regras --- app/data/domain_rules.php | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/app/data/domain_rules.php b/app/data/domain_rules.php index c1028dd..3a48671 100644 --- a/app/data/domain_rules.php +++ b/app/data/domain_rules.php @@ -190,7 +190,37 @@ return [ '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(/</g, "<") /* less than */ + .replace(/>/g, ">") /* greater than */ + .replace(/à/g, "\\u00E0") /* lowercase a with grave accent */ + .replace(/ñ/g, "\\u00F1"); /* lowercase n with tilde */ + } + }, 3000); + ', 'customStyle' => ' .vi-gateway-container { position: inherit !important;