diff --git a/package.json b/package.json index 468f4c8..cb89c16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "skohub-extension", - "version": "0.0.4", + "version": "0.0.5", "description": "", "main": "index.js", "scripts": { diff --git a/src/manifest.json b/src/manifest.json index 6a72370..f873e4d 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "__MSG_extensionName__", "short_name": "__MSG_extensionName__", - "version": "0.0.4", + "version": "0.0.5", "default_locale": "en", "description": "__MSG_extensionDescription__", diff --git a/src/page.js b/src/page.js index 6977c78..30c8646 100644 --- a/src/page.js +++ b/src/page.js @@ -1,7 +1,7 @@ /* global chrome */ var attach = async () => { - const EDITOR_URL = 'https://test.skohub.io/editor/' + const EDITOR_URL = 'https://skohub.io/editor/' const loadSavedOptions = new Promise((resolve, reject) => { chrome.storage.local.get({ defaultSchema: null }, (options) => { @@ -14,24 +14,27 @@ var attach = async () => { defaultSchema && url.searchParams.set('schema', defaultSchema) const getMetaTag = (attribute, value) => { - return (document.querySelector(`meta[${attribute}="${value}"]`) && document.querySelector(`meta[${attribute}="${value}"]`).content) || null + return (document.querySelector(`meta[${attribute}="${value}"]`) && + document.querySelector(`meta[${attribute}="${value}"]`).content) || null } const pageGetData = () => { return { name: getMetaTag('property', 'og:title') || - getMetaTag('name', 'twitter:title') || - document.title, - id: getMetaTag('property', 'og:url') || window.location.href, - description: getMetaTag('name', 'description') || - getMetaTag('property', 'og:description') || - getMetaTag('name', 'twitter:description'), + getMetaTag('name', 'twitter:title') || + document.title, + id: getMetaTag('property', 'og:url') || + window.location.href, + description: getMetaTag('property', 'og:description') || + getMetaTag('name', 'twitter:description') || + getMetaTag('name', 'description'), keywords: getMetaTag('name', 'keywords'), author: getMetaTag('name', 'author'), image: getMetaTag('property', 'og:image') || - getMetaTag('name', 'twitter:image'), + getMetaTag('name', 'twitter:image'), locale: getMetaTag('property', 'og:locale'), - type: getMetaTag('property', 'og:type') || 'CreativeWork' + type: getMetaTag('property', 'og:type') + || 'CreativeWork' } }