Skip to content

Commit f9fd57b

Browse files
committed
Fix usinenouvelle.fr
1 parent 3f3c21b commit f9fd57b

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
function extractKeywords() {
2-
return document.querySelector(".editoSocialBar__item[data-title]").dataset.title
2+
return document.querySelector("h1")?.textContent;
33
}
4-
54
async function createLink() {
65
const a = await ophirofoxEuropresseLink(extractKeywords());
7-
a.style = 'font-family: "arimo-bold",Arial,Helvetica,sans-serif; border-bottom: 2px solid #000; margin-left : 1rem'
6+
a.style.cssText = `
7+
font-family: "arimo-bold",Arial,Helvetica,sans-serif;
8+
border-bottom: 2px solid #000;
9+
float: right;
10+
margin-left: 10px;
11+
12+
font-weight: 600;
13+
`;
814
return a;
915
}
10-
1116
function findPremiumBanner() {
12-
const div = document.querySelector(".epPayWallTop");
17+
const div = document.querySelector(".c-paywall-label");
1318
if (!div) return null;
14-
console.log('all div', div)
15-
console.log('last child', div.lastElementChild)
16-
return elem = div.lastElementChild;
19+
return div.lastElementChild;
1720
}
18-
1921
async function onLoad() {
2022
const premiumBanner = findPremiumBanner();
2123
if (!premiumBanner) return;
2224
premiumBanner.after(await createLink());
2325
}
24-
25-
onLoad().catch(console.error);
26+
onLoad().catch(console.error);

0 commit comments

Comments
 (0)