Post
Topic
Board Meta
Re: [suggestion][userscript] pop up edited history when click on edited date
by
Aveatrex
on 22/08/2020, 22:53:18 UTC

I don't know how to get the loyce data

You can use fetch() of ajax like you said or you can make an XMLHttp request. Here's the XMLhttp request function (in javascript) that I use which you can find detailed on stackoverflow:

Quote from: stackoverflow
function request() {
    try {
       return new XMLHttpRequest();
    }
    catch (error) {}
    try {
       return new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (error) {}
    try {
       return new ActiveXObject("Microsoft.XMLHTTP");}
    catch (error) {}
 
    throw new Error("Couldn't make the request.");
  }

This function returns an object that has methods to actually request html from other websites (see this for details)



The extension is pretty much finished, it has 2 features: Opening the user profile within a popup when you hover his username and open the unedited post within a popup when you click on the date. Now gotta go through the hassle of getting approved in Chrome Web Store. If you have other ideas/suggestions let me know so I can try adding them.