我只做科学编程,所以我对javascript不太熟悉。我正在尝试将一个小部件添加到一个 tumblr 帖子中。我从中获得小部件的网站专门用于 tumblr,它是:
<div class="shopthepost-widget" data-widget-id="4665345"><script type="text/javascript">!function(w,i,d,g,e,t){d.getElementById(i)||(element=d.createElement(t),element.id=i,element.src="https://widgets.rewardstyle.com"+e,d.body.appendChild(element)),w.hasOwnProperty(g)===!0&&"complete"===d.readyState&&w[g].init()}(window,"shopthepost-script",document,"__stp","/js/shopthepost.js","script")</script><div class="rs-adblock"><img src="https://assets.rewardstyle.com/production/424ab6aff12fe31b5b93d8f5ce7cc70d2953e565/images/search/350.gif" onerror='this.parentNode.innerHTML="Disable your ad blocking software to view this content."' style="width: 15px; height: 15px"><noscript>JavaScript is currently disabled in this browser. Reactivate it to view this content.</noscript></div></div>
如果将其添加到 tumblr 上的实际主题中,效果会很好。然而,我试图把它放在 tumblr 上的一篇文章中。当我尝试发帖时,我会转到 html 并将其添加到那里,但它实际上不会显示在网站上。关于如何解决这个问题的任何提示?先感谢您。