Skip to content

Commit

Permalink
improve iframe documentation code by showing full official url
Browse files Browse the repository at this point in the history
  • Loading branch information
Aprillion committed Sep 9, 2023
1 parent 57e5b7d commit 4feaa27
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions public/embed-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h3>Both search and initial questions, opening inline, expanding iframe height,
id="ai-safety-search-iframe3"
height="315px"
></iframe>

<script>
'use strict'
const iframes = [...document.querySelectorAll('iframe')]
Expand All @@ -34,7 +34,7 @@ <h3>Both search and initial questions, opening inline, expanding iframe height,
}
})
</script>

<style>
body {
font-family: sans-serif;
Expand All @@ -55,5 +55,8 @@ <h3>Source code:</h3>
<script>
'use strict'
const source = document.getElementById('source')
source.textContent = document.querySelector('main').innerHTML.replace(/&amp;/g, '&')
</script>
const main = document.querySelector('main').innerHTML
source.textContent = main
.replace(/&amp;/g, '&')
.replace(/src="\//g, 'src="https://aisafety.info/')
</script>

0 comments on commit 4feaa27

Please sign in to comment.