Sandbox3: Difference between revisions

From fridemar.ai
Jump to navigation Jump to search
(atxt-> https://www.trankynam.com/atext/)
mNo edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
test RedeSchrift
test RedeSchrift
BitCoin
atxt-> https://www.trankynam.com/atext/
atxt-> https://www.trankynam.com/atext/
SandBox
[[{{TALKPAGENAME}}|Discussion]]
[[/Sub/]]
[[/example1/]]
[[/example2]]
[[file:JustanotherSvgTestFromCurve.svg]]
----
<html>
javascript: (() => {
  // Get all the text nodes in the document
  let textNodes = document.evaluate("//text()", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  // Loop through each text node
  for (let i = 0; i < textNodes.snapshotLength; i++) {
    let node = textNodes.snapshotItem(i);
    // Split the text by whitespace and punctuation
    let words = node.data.split(/[\s,.!?;:()'"`]+/);
    // Loop through each word
    for (let word of words) {
      // Check if the word is camel case
      if (word.match(/^[a-z]+[A-Z][a-zA-Z]*$/)) {
        // Replace the word with a span element that has an underline style
        node.data = node.data.replace(word, `<span style="text-decoration: underline;">${word}</span>`);
      }
    }
  }
})();
</html>
[[{{TALKPAGENAME}}|Discussion]]
----
<html>
javascript:(function(){
  var wikiWords = document.querySelectorAll(".wikilink");
  for (var i = 0; i < wikiWords.length; i++) {
    wikiWords[i].style.textDecoration = "underline";
  }
})()
</html>
WikiWord

Latest revision as of 01:37, 9 January 2024

test RedeSchrift BitCoin atxt-> https://www.trankynam.com/atext/ SandBox Discussion /Sub/ /example1/ /example2


File:JustanotherSvgTestFromCurve.svg



javascript: (() => { // Get all the text nodes in the document let textNodes = document.evaluate("//text()", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); // Loop through each text node for (let i = 0; i < textNodes.snapshotLength; i++) { let node = textNodes.snapshotItem(i); // Split the text by whitespace and punctuation let words = node.data.split(/[\s,.!?;:()'"`]+/); // Loop through each word for (let word of words) { // Check if the word is camel case if (word.match(/^[a-z]+[A-Z][a-zA-Z]*$/)) { // Replace the word with a span element that has an underline style node.data = node.data.replace(word, `${word}`); } } } })();

Discussion


javascript:(function(){ var wikiWords = document.querySelectorAll(".wikilink"); for (var i = 0; i < wikiWords.length; i++) { wikiWords[i].style.textDecoration = "underline"; } })() WikiWord