Book Getter
Copy this code snippet and save into bookmarkletunknown
javascript
22 days ago
1.1 kB
29
Indexable
Never
javascript:(function(){var t='',e='';if(window.location.href.includes('romance.io')){var n=document.querySelector('.book-info h1'),o=n.querySelectorAll('a');o.forEach(function(t){t.remove()}),t=n.textContent.trim(),e=document.querySelector('.book-info h2.author').textContent.trim()}else if(window.location.href.includes('goodreads'))t=document.querySelector('.Text__title1').textContent.trim(),e=document.querySelector('.ContributorLinksList').textContent.trim();else if(window.location.href.includes('amazon')){null!=document.querySelector('#productTitle')?t=document.querySelector('#productTitle').textContent.trim():null!=document.querySelector('#ebooksTitle')?t=document.querySelector('#ebooksTitle').textContent.trim():null!=document.querySelector('#title')?t=document.querySelector('#title').textContent.trim():alert('Error copying from Amazon. Please try a different site.'),e=Array.from(document.querySelectorAll('#bylineInfo a')).map(function(t){return t.textContent.trim()}).join(', ')}e=e.replace(/\s+/g,' ');var r=%60{${t} by ${e}}%60;navigator.clipboard.writeText(r).then(function(){alert('Copied to clipboard: '+r)})})();
Leave a Comment