11// ==UserScript==
2- // @version 2.5.250425.1414
2+ // @version 2.5.250521.1619
33// @author Write
44// @name OphirofoxScript
55// @grant GM.getValue
157157// @include https://www.usinenouvelle.com/*
158158// @include https://elpais.com/*
159159// @include https://acteurspublics.fr/*
160+ // @include https://www.sciencesetavenir.fr/*
161+ // @include https://www.larecherche.fr/*
160162//
161163// @run -at document-start
162164//
40274029 }
40284030 ` ) ;
40294031 }
4032+
4033+ if ( match ( hostname , "https://www.sciencesetavenir.fr/*" ) ) {
4034+
4035+ window . addEventListener ( "load" , function ( event ) {
4036+ async function createLink ( ) {
4037+ return await ophirofoxEuropresseLink ( ) ;
4038+ }
4039+
4040+ async function onLoad ( ) {
4041+ const statusElem = document . querySelector ( ".article-abo-tag" ) ;
4042+ if ( ! statusElem ) return ;
4043+ statusElem . appendChild ( await createLink ( ) ) ;
4044+ }
4045+
4046+ onLoad ( ) . catch ( console . error ) ;
4047+ } ) ;
4048+
4049+ pasteStyle ( `
4050+ .ophirofox-europresse{
4051+ display: inline-block;
4052+ padding: 3px 5px 1px 5px;
4053+ color: #000000!important;
4054+ border: #f05246 1px solid;
4055+ }
4056+ ` ) ;
4057+ }
4058+
4059+ if ( match ( hostname , "https://www.larecherche.fr/*" ) ) {
4060+
4061+ window . addEventListener ( "load" , function ( event ) {
4062+ async function createLink ( ) {
4063+ return await ophirofoxEuropresseLink ( extractKeywordsFromTitle ( ) ) ;
4064+ }
4065+
4066+ function extractKeywordsFromTitle ( ) {
4067+ const titleElem = document . querySelector ( 'h1.title.title1' ) ;
4068+ return titleElem . querySelector ( 'span' ) . textContent ;
4069+ }
4070+
4071+ function findPremiumBanner ( ) {
4072+ return document . querySelector ( 'i.ico.ico-lock-round' ) ;
4073+ }
4074+
4075+ async function onLoad ( ) {
4076+ const head = document . querySelector ( 'h1.title.title1' ) ;
4077+ const premiumBanner = findPremiumBanner ( ) ;
4078+ if ( ! premiumBanner ) return ;
4079+ head . before ( await createLink ( ) ) ;
4080+ }
4081+
4082+ onLoad ( ) . catch ( console . error ) ;
4083+ } ) ;
4084+
4085+ pasteStyle ( `
4086+ .ophirofox-europresse {
4087+ padding: 8px 12px;
4088+ border-radius: 8px;
4089+ border: #f05246 1px solid;
4090+ }
4091+ ` ) ;
4092+ }
40304093} ) ( ) ;
0 commit comments