diff --git a/news_parser.js b/news_parser.js index 1176219..dc63769 100644 --- a/news_parser.js +++ b/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 = '
' + content + '
'; - - document.body.insertBefore(logo, document.body.firstChild); + let news_text = document.createElement("div"); + news_text.innerHTML = '
' + content + '
'; + + 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); + } })();