mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Fixed search script element detection
refs https://github.com/TryGhost/Team/issues/1665 - The `data-ghost` attribute is used to detect portal script element. The search script will be identified by `data-ghost-search` data attribute (and probably so should the portal script in the futute)
This commit is contained in:
parent
76bc1a8c07
commit
c55a641fa6
1 changed files with 2 additions and 2 deletions
|
@ -15,9 +15,9 @@ function getSiteData() {
|
|||
/**
|
||||
* @type {HTMLElement}
|
||||
*/
|
||||
const scriptTag = document.querySelector('script[data-ghost]');
|
||||
const scriptTag = document.querySelector('script[data-ghost-search]');
|
||||
if (scriptTag) {
|
||||
const siteUrl = scriptTag.dataset.ghost;
|
||||
const siteUrl = scriptTag.dataset.ghostSearch;
|
||||
const apiKey = scriptTag.dataset.key;
|
||||
const apiUrl = scriptTag.dataset.api;
|
||||
return {siteUrl, apiKey, apiUrl};
|
||||
|
|
Loading…
Add table
Reference in a new issue