Wikipedia talk:WikiProject JavaScript: Difference between revisions

Content deleted Content added
Line 179:
 
:: I look forward to your reply. [[User talk:The Transhumanist|<i>The&nbsp;Transhumanist</i>]] 13:58, 6 May 2017 (UTC)
 
::: "*" is a quantifier (a special character) and, as well as all other special characters, it needs to be escaped when it is part of the pattern of characters that you want to find or replace. See: [https://www.w3schools.com/jsref/jsref_obj_regexp.asp w3schools.com/jsref/jsref_obj_regexp.asp]. About the use of the alert for debugging purpose I suggest you to use console.log() method to display data directly within the debugger of the browser. More @: [https://www.w3schools.com/js/js_debugging.asp w3schools.com/js/js_debugging.asp]. The debugger itself should be also able to show you which and where is the error within your code. About the editing of the article and the DOM manipulation, it doesn't save the changes, but if an user is in the editor window/view and it presses the save button all changes that have been made to the content will be saved. –[[User:Pjoef|p<span style="color: #802400">joe</span>f]] <small>(''[[User talk:Pjoef|talk]]'' • [[Special:Contributions/Pjoef|contribs]])</small> 09:26, 7 May 2017 (UTC)
 
:Running the code in generated document seems to be easier because we can make use of HTML structure. A leaf link safe to remove is the only child of <code>li</code>.