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

Repair Flattr-Button on mainpage #60

Open
Drake81 opened this issue Dec 2, 2014 · 7 comments · Fixed by #67
Open

Repair Flattr-Button on mainpage #60

Drake81 opened this issue Dec 2, 2014 · 7 comments · Fixed by #67

Comments

@Drake81
Copy link
Member

Drake81 commented Dec 2, 2014

No description provided.

@Drake81 Drake81 added bug and removed feature labels Dec 15, 2014
@Drake81 Drake81 changed the title Add Flattr-Button on Webpage Repair Flattr-Button on mainpage Dec 15, 2014
@nonchip
Copy link
Contributor

nonchip commented Jan 24, 2015

fixed by calling FlattrLoader.setup(); onload (make sure the async flattr script at the bottom of body is also loaded), because the auto mode only works for links defined in HTML and if the script is loaded sync in header, which both doesn't apply (we're loading it async at the bottom of body, just above piwik, AND most buttons are generated on run time by angular).

(section about removing <script async removed, because it doesn't apply here)

nonchip added a commit to nonchip/snotes20-angular-webapp that referenced this issue Jan 24, 2015
at least in my chrome
@nonchip
Copy link
Contributor

nonchip commented Jan 24, 2015

i don't know for sure if pull request #67 will also fix the other buttons created by angular, we might have to call FlattrLoader.setup(); again after creating any new buttons (e.g. after rendering the podcast list)

@nonchip nonchip mentioned this issue Jan 24, 2015
@Drake81 Drake81 reopened this Jan 24, 2015
@nonchip
Copy link
Contributor

nonchip commented Jan 24, 2015

note: that sometimes fixes it (depending on the async load order), but at least now we know we have to handle button creation and call FlattrLoader.setup() dynamically

@luto
Copy link
Member

luto commented Jan 24, 2015

@nonchip
Copy link
Contributor

nonchip commented Jan 24, 2015

ok, i'm pretty sure we could use this, except we have to make sure to use unique id attributes (or don't use them at all, there's document.currentScript, except for some IEs, do we support them?). looking into that

@luto
Copy link
Member

luto commented Jan 24, 2015

currently we support newest chrome, firefox, opera (== chrome) and sometimes safari.

@luto
Copy link
Member

luto commented Jan 24, 2015

unique ids aren't a problem, though, just use the document name as id (e.g. id="{{doc.name}}_flattr" or so).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants