forked from basarat/typescript-book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.html
18 lines (18 loc) · 706 Bytes
/
header.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<script>
function __addSupport() {
var el = document.querySelector('.search-noresults');
var content = '<a href="https://paypal.me/basaratali" style="display: block;text-align: center;"> Buy me a beer / coffee 🍻 ☕️ 🌹 <br><br><img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="donate"><br><br></a>';
if(el) {
if (el.innerHTML.indexOf(content) === -1){
var elChild = document.createElement('div');
elChild.innerHTML = content;
el.insertBefore(elChild, el.firstChild);
}
clearInterval(interval);
}
}
__addSupport();
var interval = setInterval(function(){
__addSupport();
},1000);
</script>