Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: common/donate.js

Issue 8493027: Acquired Opera AdBlock code (Closed)
Patch Set: Created Oct. 8, 2012, 5:58 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « common/copyright.js ('k') | common/header.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/donate.js
===================================================================
new file mode 100644
--- /dev/null
+++ b/common/donate.js
@@ -0,0 +1,35 @@
+var donateParent = document.getElementById('donate');
+
+//PAYPAL
+var paypal = document.createElement('div');
+paypal.setAttribute('id', 'paypal');
+
+var paypalLink = document.createElement('a');
+paypalLink.setAttribute('href', 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=' + paypalId);
+paypalLink.setAttribute('onClick', "notify(translate.get('notif_donate_title'), translate.get('notif_donate_descript'));");
+
+var paypalImage = document.createElement('img');
+paypalImage.setAttribute('class', 'donate-button');
+paypalImage.setAttribute('alt', 'PayPal');
+paypalImage.setAttribute('src', '/images/paypal.gif');
+
+paypalLink.appendChild(paypalImage);
+paypal.appendChild(paypalLink);
+donateParent.appendChild(paypal);
+
+//FLATTR
+var flattr = document.createElement('div');
+flattr.setAttribute('id', 'flattr');
+
+var flattrLink = document.createElement('a');
+flattrLink.setAttribute('href', 'https://flattr.com/thing/273210/Opera-AdBlock');
+flattrLink.setAttribute('onClick', "notify(translate.get('notif_donate_title'), translate.get('notif_donate_descript'));");
+
+var flattrImage = document.createElement('img');
+flattrImage.setAttribute('class', 'donate-button');
+flattrImage.setAttribute('alt', 'Flattr');
+flattrImage.setAttribute('src', '/images/flattr.png');
+
+flattrLink.appendChild(flattrImage);
+flattr.appendChild(flattrLink);
+donateParent.appendChild(flattr);
« no previous file with comments | « common/copyright.js ('k') | common/header.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld