Add Caixin Global

Already in Firefox add-on.
This commit is contained in:
magnolia1234 2019-12-20 18:20:09 +01:00 committed by GitHub
parent 4ef5e6c0b6
commit e1e5461c63
4 changed files with 20 additions and 0 deletions

View File

@ -22,6 +22,7 @@
[Bloomberg](https://www.bloomberg.com)\
[Bloomberg Quint](https://www.bloombergquint.com)\
[Business Insider](https://www.businessinsider.com)\
[Caixin Global](https://www.caixinglobal.com)\
[Chicago Tribune](https://www.chicagotribune.com)\
[Corriere Della Sera](https://www.corriere.it)\
[Crain's Chicago Business](https://www.chicagobusiness.com)\

View File

@ -11,6 +11,7 @@ var defaultSites = {
'Bloomberg': 'bloomberg.com',
'Bloomberg Quint': 'bloombergquint.com',
'Business Insider': 'businessinsider.com',
'Caixin Global': 'caixinglobal.com',
'Crain\'s Chicago Business': 'chicagobusiness.com',
'Chicago Tribune': 'chicagotribune.com',
'Corriere Della Sera': 'corriere.it',
@ -121,6 +122,7 @@ var allow_cookies = [
'ad.nl',
'asia.nikkei.com',
'bostonglobe.com',
'caixinglobal.com',
'canberratimes.com.au',
'chicagobusiness.com',
'demorgen.be',
@ -165,6 +167,7 @@ var remove_cookies = [
'ad.nl',
'asia.nikkei.com',
'bostonglobe.com',
'caixinglobal.com',
'canberratimes.com.au',
'chicagobusiness.com',
'demorgen.be',
@ -206,6 +209,7 @@ const remove_cookies_select_hold = {
const remove_cookies_select_drop = {
'ad.nl': ['temptationTrackingId'],
'bostonglobe.com': ['FMPaywall'],
'caixinglobal.com': ['CAIXINGLB_LOGIN_UUID'],
'demorgen.be': ['TID_ID'],
'economist.com': ['rvuuid'],
'ed.nl': ['temptationTrackingId'],

View File

@ -235,6 +235,20 @@ if (window.location.href.indexOf("the-tls.co.uk") !== -1) {
removeDOMElement(paywall);
}
if (window.location.href.indexOf("caixinglobal.com") !== -1) {
const pay_tip = document.querySelectorAll('.cons-pay-tip');
for (let i = 0; i < pay_tip.length; i++) {
pay_tip[i].removeAttribute('style');
}
const appContent = document.getElementById('appContent');
if (appContent) {
const p_hidden = document.querySelectorAll('p:not([style="display:block;"]');
for (let i = 0; i < p_hidden.length; i++) {
p_hidden[i].setAttribute('style', 'display:block;');
}
}
}
function removeDOMElement(...elements) {
for (let element of elements) {
if (element)

View File

@ -6,6 +6,7 @@ var defaultSites = {
'Bloomberg': 'bloomberg.com',
'Bloomberg Quint': 'bloombergquint.com',
'Business Insider': 'businessinsider.com',
'Caixin Global': 'caixinglobal.com',
'Crain\'s Chicago Business': 'chicagobusiness.com',
'Chicago Tribune': 'chicagotribune.com',
'Corriere Della Sera': 'corriere.it',