2025-2-26-fixed
This commit is contained in:
22
themes/next/layout/_third-party/rating.swig
vendored
Normal file
22
themes/next/layout/_third-party/rating.swig
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
{%- if theme.rating.enable %}
|
||||
<script{{ pjax }}>
|
||||
if (CONFIG.page.isPost) {
|
||||
wpac_init = window.wpac_init || [];
|
||||
wpac_init.push({
|
||||
widget: 'Rating',
|
||||
id : {{ theme.rating.id }},
|
||||
el : 'wpac-rating',
|
||||
color : '{{ theme.rating.color }}'
|
||||
});
|
||||
(function() {
|
||||
if ('WIDGETPACK_LOADED' in window) return;
|
||||
WIDGETPACK_LOADED = true;
|
||||
var mc = document.createElement('script');
|
||||
mc.type = 'text/javascript';
|
||||
mc.async = true;
|
||||
mc.src = '//embed.widgetpack.com/widget.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling);
|
||||
})();
|
||||
}
|
||||
</script>
|
||||
{%- endif %}
|
||||
Reference in New Issue
Block a user