Browse Source

Новый источник: Газета Известия

master
parent
commit
1424049f30
  1. 38
      news_parser.js

38
news_parser.js

@ -1,7 +1,7 @@
// ==UserScript==
// @name News parser
// @namespace http://zakonvremeni.ru
// @version 0.3.4
// @version 0.3.5
// @description Parse news
// @author AlexeiBv+mirocod@narod.ru
// @match https://tass.ru/*
@ -10,6 +10,7 @@
// @match https://www.cnews.ru/*
// @match https://mixednews.ru/*
// @match https://russian.rt.com/*
// @match https://iz.ru/*
// @match https://zakonvremeni.ru/*
// @icon https://icons.duckduckgo.com/ip2/zakonvremeni.ru.ico
// @grant none
@ -459,6 +460,24 @@
[]
);
}
else if (location.hostname == 'iz.ru') {
// https://iz.ru/1639291/2024-01-24/amerikanskii-esminetc-uss-john-finn-proshel-cherez-taivanskii-proliv
const base_element = document.getElementById('block-purple-content');
content = MakeContentByNews(
base_element,
base_element,
base_element,
'm-t-10',
'big_photo__img',
'text-article__inside',
ElementCheckerTrue,
SubElementCheckerToRemoveTemplate(
'more_style_one|igi-player|share_bottom|recommendation-block|layer-' //, 'DIV|IFRAME'
),
[]
);
}
else if (location.hostname == 'zakonvremeni.ru') {
const base_element = document.getElementsByClassName('item-page')[0];
const title = GetContentInContainers(FindElementsByRegExp(GetElementClassName, 'page-header', base_element), grub_text_func, FinishWorkFuncZV);
@ -481,9 +500,18 @@
}
let content = MakeContent();
let logo = document.createElement("div");
logo.innerHTML = '<div style="margin: 0pt auto; width: 800px; text-align: center;">' + content + '</div>';
document.body.insertBefore(logo, document.body.firstChild);
let news_text = document.createElement("div");
news_text.innerHTML = '<div style="margin: 0pt auto; width: 800px; text-align: center;">' + content + '</div>';
if (location.hostname == 'iz.ru') {
let top_panel = document.getElementsByClassName('top-panel')[0];
top_panel.parentNode.removeChild(top_panel);
let base_child = document.getElementsByClassName('m-t-10')[0];
base_child.appendChild(news_text);
}
else {
let base_child = document.body.firstChild
document.body.insertBefore(news_text, base_child);
}
})();

Loading…
Cancel
Save