mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-02 07:43:11 +03:00
Fixed search script element detection
refs https://github.com/TryGhost/Team/issues/1665
refs b996eadbd4
- The search script injected by Ghost will be identified by `data-sodo-search` data attribute.
This commit is contained in:
parent
4a65cc6833
commit
ec3d0b27cd
@ -15,9 +15,9 @@ function getSiteData() {
|
||||
/**
|
||||
* @type {HTMLElement}
|
||||
*/
|
||||
const scriptTag = document.querySelector('script[data-ghost-search]');
|
||||
const scriptTag = document.querySelector('script[data-sodo-search]');
|
||||
if (scriptTag) {
|
||||
const siteUrl = scriptTag.dataset.ghostSearch;
|
||||
const siteUrl = scriptTag.dataset.sodoSearch;
|
||||
const apiKey = scriptTag.dataset.key;
|
||||
const apiUrl = scriptTag.dataset.api;
|
||||
return {siteUrl, apiKey, apiUrl};
|
||||
|
Loading…
Reference in New Issue
Block a user