This discussion is for JSON objects, u can add tips or ask questions about JavaScript Object Notation
new Object {
"text":"hi",
score:0
}

var newobj = JSON.parse(JSON.stringify(obj));
this will clone an object by converting it to JSON and back to an object

Using the window.location method, why haven’t people created projects that share JSON data.
It could be a useful feature in a social media in app lab or gamelab.

var userData = {
id:encodeURIComponent(getUserId()),
username:"Nver678",
password:"t5hsg76jk9o
}
window.location=(path)+userData;

    SquirrelGuy-5 GLS and [WUT] World used that feature to some extent. You could link to posts or profiles.

    Indeed? Interesting.
    Ima sure that this has been used before, but how about using certain JSON with functions to add HTML elements to a page with themes.
    function newRect({x,y,bg,color}) {
    var newDiv = document.createElement("div");
    newDiv.style.transform="translate("+this.x+"px,"+this.y+"px)";
    …rest of code
    }

      SquirrelGuy-5 That would be nice... if document was available to use. You just have to use write() instead.

      Awards

      • â’¸ 1 from Varrience
        Comment: me when innerHTML exists, but yea that's sanitized too smh

        SquirrelGuy-5 that's because you could do that in html.... if you need it to dynamically push elements that copy that format it's understandable, but doing it just to make JS html doesn't make too much sense when spreadsheets exist, you'd just be making inferior CSS not that I've used it much but I'm pretty sure that what you want to do is not best practice... hence why it's not being used

          Varrience Yet this technique would be handy if you built a webpage that required the feature–and even if it didn’t, it would still be useful.
          Instead of having to write a new HTML tag with a CSS class (which wouldn’t be as customizable) you could just have one JavaScript function:
          newRect({x:50,y,50,color:"red"});
          Of course the code would need to be altered to prevent a syntax error from occurring.
          You could also code this function and use it in the JavaScript setInterval loop as a [hack] script to overload a webpage.

            5 days later

            SquirrelGuy-5 soo..... i still don't really see the point, if anything it sounds like style="" or <style></style> with extra steps even then if you want different formats just load in another CSS file in JS, also jquery has a lot of functionality over JS when it comes to elements and what you want to do with them, unless you really need dynamic elements that are going to be whole fully different i'd say it'd be a waste though if you wanted to you could just make your own library if you prefer to make webpages in JS over anything else

              Varrience well whatever. It could still be helpful. Oh and now ima turning this JSON conversation into a hacking tips and techniques conversation.
              So yeah. Tell me what u know. I tell u what i know.
              window.dashboard.project.delete();

              @SquirrelGuy-5 you could just read the repo... that has all the functionality if you know where to look

              Chat