The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Number Repeater Tool

TODO: Pull subtitle into page object

- Put text in the top box with the word `NUMBER` in all caps where you'd like it replaced

- Set the number of times you want it repated

- Copy out from the bottom

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Number Repeater Tool

-- olist

- Put text in the top box with the word `NUMBER` in
all caps where you'd like it replaced

- Set the number of times you want it repated

- Copy out from the bottom


-- html

<div>
<input type="number" id="startNumber" value="1" />
<input type="number" id="endNumber" value="5" />
</div>

<textarea id="initialText" cols="60" rows="9"></textarea>
<textarea id="updatedText" cols="60" rows="14"></textarea>


-- script

const updateText = () => {
  var outputText = ""
    for (let i=startNumber.value; i<=endNumber.value; i++) {
      outputText += `${initialText.value.replaceAll("NUMBER", i)}\n\n`
    }
  updatedText.value = `${outputText}`
}

document.addEventListener(
  "DOMContentLoaded", () => {
    initialText.addEventListener("input", updateText)
    startNumber.addEventListener("input", updateText)
    endNumber.addEventListener("input", updateText)
  }
)


-- categories
-- Tools 

-- metadata
-- date: 2023-07-13 16:33:09
-- id: 2sx64ker
-- site: aws
-- type: post
-- status: published