mirror of
https://github.com/fmhy/edit.git
synced 2025-07-30 07:42:18 +10:00
added script to redirect to main site if embedded
This commit is contained in:
parent
fde68e9eed
commit
3445594ccd
1 changed files with 12 additions and 0 deletions
|
@ -63,6 +63,18 @@ export default defineConfig({
|
|||
name: 'google-site-verification',
|
||||
content: 'XCq-ZTw6VJPQ7gVNEOl8u0JRqfadK7WcsJ0H598Wv9E'
|
||||
}
|
||||
],
|
||||
// Redirect to main site if embedded in iframe
|
||||
[
|
||||
'script',
|
||||
{},
|
||||
`
|
||||
(function() {
|
||||
if (window.self !== window.top) {
|
||||
window.top.location = window.location.href;
|
||||
}
|
||||
})();
|
||||
`
|
||||
]
|
||||
],
|
||||
transformHead: async (context) => generateMeta(context, meta.hostname),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue