diff --git a/package.json b/package.json index 65f784e..f1b94b0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "origami", "description": "Origami: a fancy ghost theme", "demo": "https://blog.khinenw.tk", - "version": "1.2.0", + "version": "1.3.0", "engines": { "ghost": ">=0.9.0 <1.0.0" }, @@ -47,12 +47,12 @@ "webpack-dev-server": "^2.3.0" }, "dependencies": { + "babel-polyfill": "^6.23.0", "clipboard": "^1.6.0", "downsize": "0.0.8", "fitvids": "^2.0.0", "mdi": "^1.8.36", "prismjs": "^1.6.0", - "promise-polyfill": "^6.0.2", "resolve-url": "^0.2.1", "vue": "^2.1.10", "whatwg-fetch": "^2.0.2" diff --git a/src/index.js b/src/index.js index 8146d5d..a3d299d 100644 --- a/src/index.js +++ b/src/index.js @@ -2,10 +2,11 @@ import "./index.less"; //Polyfills -import Promise from 'promise-polyfill'; +/*import Promise from 'promise-polyfill'; if (!window.Promise) { window.Promise = Promise; -} +}*/ +import "babel-polyfill"; import "whatwg-fetch"; //Vue @@ -60,7 +61,7 @@ new Clipboard('[data-origami-link]', { }); window.addEventListener('load', () =>{ - $$('pre[class*="language-"]').forEach((v) => { - v.setAttribute('data-lang', v.className.split(' ').find((v) => v.startsWith('language-'))) + Array.prototype.forEach.call($$('pre[class*="language-"]'), (v) => { + v.setAttribute('data-lang', v.className.split(' ').find((v) => v.startsWith('language-'))); }); });