Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule for Danish politiken.dk #19

Merged
merged 2 commits into from
Oct 31, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added getSponsor for politiken.dk h/t @Zegnat
  • Loading branch information
ndarville committed Sep 23, 2014
commit 5ab23e913aae8eca9b20990bb3ccfe35dc5b8f02
7 changes: 7 additions & 0 deletions src/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,13 @@ _window.AD_DETECTOR_RULES = {
match: function() {
return urlContains('/annoncesektion/');
},
getSponsor: function() {
var paidElts = document.getElementsByClassName('disclaimer');
if (paidElts.length < 1) {
return null;
}
return paidElts[0].innerHTML.replace('Annoncørindhold fra ', '');
},
},
],
'prnewswire.com': [
Expand Down