Wikipedia talk:User scripts/Guide: Difference between revisions

Content deleted Content added
Dimpizzy (talk | contribs)
Weird syntax: new section
Line 93:
 
Is there a reason the code is written <code>document.editform.wpTextbox1.value = "{" + "{wikify}}\n\n" + document.editform.wpTextbox1.value;</code>? Why are the two left brackets separated? [[User:Dimpizzy|Dimpizzy]] ([[User talk:Dimpizzy|talk]]) 17:42, 20 January 2023 (UTC)
 
:Probably to keep {{t|wikify}}'s content from getting substituted into the code, which can happen if you don't wrap your scripts in
:<syntaxhighlight lang="js">//<nowiki>
:scriptGoesHere();
://</nowiki></syntaxhighlight> –[[User:Novem Linguae|<span style="color:limegreen">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 17:45, 20 January 2023 (UTC)