ajuste de regras

This commit is contained in:
Renan Bernordi 2025-01-23 17:32:16 -03:00
parent f1ac7d1f79
commit de345d2eca

View file

@ -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(/&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;