Skip to content

Commit

Permalink
Fix all the typos
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjbradshaw committed May 19, 2024
1 parent 814fb6a commit fb1a0ae
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"cSpell.words": [
"consts"
"consts",
"sonarjs"
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"node": ">=20.0.0"
},
"keywords": [
"iFrame",
"iframe",
"Resizing",
"Resizer",
"auto-height",
Expand Down
9 changes: 4 additions & 5 deletions packages/child/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,6 @@ function setupInPageLinks() {
}

function enableInPageLinks() {
/* istanbul ignore else */ // Not testable in phantonJS
log('Setting up location.hash handlers')
bindAnchors()
bindLocationHash()
Expand All @@ -567,7 +566,7 @@ function setupInPageLinks() {
if (inPageLinks.enable) {
if (mode === 1) {
advise(
`In page linking requires a Profesional or Business license. Please see https://iframe-resizer.com/pricing for more details.`,
`In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details.`,
)
} else {
enableInPageLinks()
Expand Down Expand Up @@ -810,7 +809,7 @@ function getMaxElement(side) {
hasCheckVisibility &&
!element.checkVisibility(checkVisibilityOptions)
) {
log(`Skipping non-visable element: ${getElementName(element)}`)
log(`Skipping non-visible element: ${getElementName(element)}`)
len -= 1
return
}
Expand Down Expand Up @@ -838,7 +837,7 @@ Position calculated from HTML element: ${elementSnippet(maxEl)}`
advise(
`<rb>Performance Warning</>
Calculateing the page size took an excessive amount of time. To improve performace add the <b>data-iframe-size</> attribute to the ${side} most element on the page.
Calculating the page size took an excessive amount of time. To improve performace add the <b>data-iframe-size</> attribute to the ${side} most element on the page.
${logMsg}`,
)
}
Expand Down Expand Up @@ -877,7 +876,7 @@ function switchToAutoOverflow({
const side = isHeight ? 'bottom' : 'right'
const overflowDetectedMessage = `<rb>Detected content overflowing html element</>
This causes <i>iframe-resizer</> to fall back to checking the position of every element on the page in order to calculate the correct dimensions of the iframe. Inspecting the size, ${side} margin, and position of every visable HTML element will have a performace impact on more complex pages.
This causes <i>iframe-resizer</> to fall back to checking the position of every element on the page in order to calculate the correct dimensions of the iframe. Inspecting the size, ${side} margin, and position of every visible HTML element will have a performance impact on more complex pages.
To fix this issue, and remove this warning, you can either ensure the content of the page does not overflow the <b><HTML></> element or alternatively you can add the attribute <b>data-iframe-size</> to the elements on the page that you want <i>iframe-resizer</> to use when calculating the dimensions of the iframe.
Expand Down
2 changes: 1 addition & 1 deletion packages/common/mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const l = (l) => {
y = [
'<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>',
'<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>',
'Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbylz spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvtlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjlujl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>',
'Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>',
'<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.',
],
z = ['NWSc3', 'ihzpj', 'wyvmlzzpvuhs', 'ibzpulzz', 'vlt'],
Expand Down
21 changes: 9 additions & 12 deletions packages/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ setLogSettings(settings)

function iframeListener(event) {
function resizeIFrame() {
// ensureInRange('Height')
// ensureInRange('Width')

setSize(messageData)
setPagePosition(iframeId)

Expand Down Expand Up @@ -239,10 +236,10 @@ function iframeListener(event) {
}
}

function setListener(requestType, listenr) {
function setListener(requestType, listener) {
log(id, `${requestType} listeners for send${type}`)
listenr(window, 'scroll', sendInfo('scroll'))
listenr(window, 'resize', sendInfo('resize window'))
listener(window, 'scroll', sendInfo('scroll'))
listener(window, 'resize', sendInfo('resize window'))
}

function stop() {
Expand Down Expand Up @@ -801,10 +798,10 @@ function createOutgoingMsg(iframeId) {

return [
iframeId,
'8', // Backwards compatability (PaddingV1)
'8', // Backwards compatibility (PaddingV1)
iframeSettings.sizeWidth,
iframeSettings.log,
'32', // Backwards compatability (Interval)
'32', // Backwards compatibility (Interval)
iframeSettings.enablePublicMethods,
iframeSettings.autoResize,
iframeSettings.bodyMargin,
Expand All @@ -813,7 +810,7 @@ function createOutgoingMsg(iframeId) {
iframeSettings.bodyPadding,
iframeSettings.tolerance,
iframeSettings.inPageLinks,
'child', // Backwards compatability (resizeFrom)
'child', // Backwards compatibility (resizeFrom)
iframeSettings.widthCalculationMethod,
iframeSettings.mouseEvents,
iframeSettings.offsetHeight,
Expand Down Expand Up @@ -842,7 +839,7 @@ export default (options) => (iframe) => {

function ensureHasId(iframeId) {
if (iframeId && typeof iframeId !== 'string') {
throw new TypeError('Invaild id for iFrame. Expected String')
throw new TypeError('Invalid id for iFrame. Expected String')
}

if (iframeId === '' || !iframeId) {
Expand Down Expand Up @@ -895,10 +892,10 @@ export default (options) => (iframe) => {

function checkReset() {
const firstRun = settings[iframeId]?.firstRun
const resetRequertMethod =
const resetRequestMethod =
settings[iframeId]?.heightCalculationMethod in resetRequiredMethods

if (!firstRun && resetRequertMethod) {
if (!firstRun && resetRequestMethod) {
resetIFrame({ iframe, height: 0, width: 0, type: 'init' })
}
}
Expand Down
4 changes: 0 additions & 4 deletions packages/core/values/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ export default Object.freeze({
id: 'iFrameResizer',
log: false,
license: undefined,
// maxHeight: Infinity,
// maxWidth: Infinity,
// minHeight: 0,
// minWidth: 0,
mouseEvents: true,
offsetHeight: null,
offsetWidth: null,
Expand Down

0 comments on commit fb1a0ae

Please sign in to comment.