🏗️ First time sync the css & js files from hexo theme NexT
This commit is contained in:
22
assets/js/third-party/rating.js
vendored
Normal file
22
assets/js/third-party/rating.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/* global CONFIG, WPac */
|
||||
|
||||
(function() {
|
||||
const widgets = [{
|
||||
widget: 'Rating',
|
||||
id : CONFIG.rating.id,
|
||||
el : 'wpac-rating',
|
||||
color : CONFIG.rating.color
|
||||
}];
|
||||
|
||||
document.addEventListener('page:loaded', () => {
|
||||
if (!CONFIG.page.isPost) return;
|
||||
|
||||
const newWidgets = widgets.map(widget => ({ ...widget }));
|
||||
|
||||
if (window.WPac) {
|
||||
WPac.init(newWidgets);
|
||||
} else {
|
||||
window.wpac_init = newWidgets;
|
||||
}
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user