[Script] CE dynamic signature

2 days ago

MARLIS

13 Total Respect

MARLIS

13 Respect

2 days ago

I made a script to add dynamic content to the profile signature, see my own as an example. 

Installation:

  1. Install Tampermonkey or Violentmonkey browser add-on
  2. Go to https://greasyfork.org/en/scripts/520520-ap-megascript-public and install the script (includes the default template)

If you only want to make the default version work, you can add an element <div id="jobs" class="autoSig"></div> and <div id="trading" class="autoSig"></div> anywhere in your profile signature (make sure you use the code editor, you can access it via the <> button).

Or, even simpler, copypaste my own signature into that same code editor.

I don't know how popular this script will be, given its niche usecase. But if you struggle with the guide (see below), I can also try to make a custom version for your needs. For now, I'll do that for free.

For custom data, I'll try to write a step-by-step guide to explain the process of adding data from a new page:

  1. In the userscript header, add
    // @match        https://cartelempire.online/jobs
    // @match        https://cartelempire.online/Jobs
    where "jobs" and "Jobs" is replaced by the page you're interested in.
  2. In the tampermonkey main function (see screenshot), add your page with a handler for it, that will be executed when the page is loaded.
  3. Write the actual handler for the page. I followed the format of the MegaScript (in<pagename>), but that is optional. Make sure it includes:
    • (optional) a check of whether your data needs to be updated, for example by comparing the current time to the time you last updated the data
    • something to update your data with GM_setValue()
  4. Update the init() function to set default values for your data.
  5. Update the updateStorage() function to properly save your data.
  6. Update the constructProfileSignature() function to use the data in your signature.


  7. Create the function to construct the part of the signature related to certain data (e.g. constructJobSig())


  8. Add an element with the corresponding id set in constructProfileSignature() to your profile signature. Note that anything in it will be overwritten. Make sure its classlist includes "autoSig".
  9. After saving the script and the profile signature, visit the page you added and update your profile signature again. The dynamic content should have been added.

That's it, feel free to leave suggestions, bugs or just general feedback in this threat. You can also dm me or send me a mail of course.

 

Also, I copied a few things from the AP MegaScript, such as the url filtering, so shoutout to K9 / Jablesi / AP for making it public and open-source.

Resources: the imgur album including the images for the guide. 

Last Edited 21/06/2025, 17:03:22