Form:Question: Difference between revisions

From Karteria DWRP Wiki
Jump to navigationJump to search
No edit summary
Undo revision 1040 by 161.65.81.188 (talk)
Line 38: Line 38:


Function for making dw comments easily copyable
Function for making dw comments easily copyable
<nowiki>
 
function encodeHtmlEntities(str) {{{}}
    var encoded = $('<div/>').text(str).html();
    return '<textarea>' + encoded + '</textarea>';
}
function myFunction(comment){
  var x = $(comment).html();
  $(comment).prepend(encodeHtmlEntities(x));
 
}
var comments = $(".dwexpcomment .comment-content");
console.log(comments.length);
for (let i = 0;i < comments.length;i++){
  var encoded = $('<div/>').text($(comments).eq(i).html()).html();
  $(comments).eq(i).html(encoded);
}</nowiki>
</includeonly>
</includeonly>

Revision as of 14:54, 14 December 2025

This is the "Question" form. To create a page with this form, enter the page name below; if a page with that name already exists, you will be sent to a form to edit that page.