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

Rule for Danish politiken.dk #19

merged 2 commits into from
Oct 31, 2014

Conversation

ndarville
Copy link
Collaborator

@Zegnat
Copy link

Zegnat commented Sep 23, 2014

Might be an idea to add a getSponsor method as well? E.g. you could take the one from the New York Times rule and adapt it to check the disclaimer used by politiken.dk:

      getSponsor: function() {
        var paidElts = document.getElementsByClassName('disclaimer');
        if (paidElts.length < 1) {
          return null;
        }
        return paidElts[0].innerHTML.replace('Annoncørindhold fra ', '');
      },

@ndarville
Copy link
Collaborator Author

Good call, thanks for letting me know about the NYT rule.

My pattern-foo isn’t that strong in general, so I’m more than happy to copy-pasta. :)

mldangelo pushed a commit that referenced this pull request Oct 31, 2014
Rule for Danish politiken.dk
@mldangelo mldangelo merged commit 90e2bd6 into typpo:master Oct 31, 2014
@mldangelo
Copy link
Collaborator

Thanks so much for adding this rule.

@ndarville ndarville deleted the patch-1 branch October 31, 2014 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants