Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
- <script>
- jQuery(function($) {
- const readPromo = (successCallback, failedCallback) => {
- const asinUrl = 'https://shop.spreadshirt.de/welovetee';
- if (asinUrl.length > 0) {
- // Get Sales Rank
- $.get(asinUrl, (res) => {
- const doc = $(res);
- let rank = doc.find('.sprd-promo-header');
- successCallback(rank);
- });
- } else if (typeof failedCallback === 'function') {
- failedCallback();
- }
- };
- // Call function
- readPromo(
- (r) => {
- if (r.length > 0) {
- $('#spreadshop-promo-banner').append(`<td><div class="prdm-expandable">${r.html()}</div></td>`);
- }
- });
- })
- </script>
- </head>
- <body>
- <div id="spreadshop-promo-banner"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement