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); |