- Spud's Ultimate Cemetech User Script
- 03 Apr 2014 05:09:17 pm
- Last edited by spud2451 on 20 Aug 2022 07:46:39 pm; edited 24 times in total
Spud's Ultimate Cemetech User Script
Hey and welcome to the official topic of the Ultimate Cemetech Userscript!
Features:
Name Highlighting!
High Contrast Selection Color!
Karma System Support!
Custom Post Styling!
Pop-Out JsTIfied!
Get Image Source Link!
Community Made!
IFrames!
No Script - No Problem!
Soon to come:
More Names!
More Chat Features!
And More!
[EXAMPLE] BBCode Tags
!!Spaces should be replaced with two dashes!!
[url=karma://USERNAME HERE] LABEL (USERNAME)[/url]
[url=style://STYLE CODE HERE] CONTENT [/url]
[url=iframe://URL INCLUDING HTTP PART]IFRAME NOT SUPPORTED MESSAGE[/url]
[url=jstified://THIS TEXT BREAKS IT]LABEL[/url]
[WORKING] BBCode Tags
!!Spaces should be replaced with two dashes!!
- Karma Button -
Spud
- Styled Div-
SOME CONTENT HERE
- Minecraft Iframe-
Minecraft Classic Iframe
- JsTIfied -
JsTIfied
Have Ideas For the Script?
If you have ideas feel free to take the existing code, modify it, and re-post it. That's one of the great things about this script, it's community made!
The Source
Code:
Contact Info
If you have any questions about the script or it functions please email me at spud2451@gmail.com
Hey and welcome to the official topic of the Ultimate Cemetech Userscript!
Features:
Name Highlighting!
High Contrast Selection Color!
Karma System Support!
Custom Post Styling!
Pop-Out JsTIfied!
Get Image Source Link!
Community Made!
IFrames!
No Script - No Problem!
Soon to come:
More Names!
More Chat Features!
And More!
[EXAMPLE] BBCode Tags
!!Spaces should be replaced with two dashes!!
[url=karma://USERNAME HERE] LABEL (USERNAME)[/url]
[url=style://STYLE CODE HERE] CONTENT [/url]
[url=iframe://URL INCLUDING HTTP PART]IFRAME NOT SUPPORTED MESSAGE[/url]
[url=jstified://THIS TEXT BREAKS IT]LABEL[/url]
[WORKING] BBCode Tags
!!Spaces should be replaced with two dashes!!
- Karma Button -
Spud
- Styled Div-
SOME CONTENT HERE
- Minecraft Iframe-
Minecraft Classic Iframe
- JsTIfied -
JsTIfied
Have Ideas For the Script?
If you have ideas feel free to take the existing code, modify it, and re-post it. That's one of the great things about this script, it's community made!
The Source
Code:
// ==UserScript==
// @name Spud's Ultimate Cemetech User Script 2.0.1
// @namespace https://nullnode.itch.io
// @version 2.0.1
// @description A small but usefull userscript for the cemetech.net website
// @include *cemetech.net/*
// @exclude https://www.cemetech.net/forum/posting.php?mode=editpost*
// @exclude https://www.cemetech.net/forum/profile.php*
// @exclude https://www.cemetech.net/projects/jstified/*
// @copyright 2022 Nathaniel Fitzpatrick
// @grant none
// ==/UserScript==
window.showjstified = function(){
var jstifieds = Array.from(document.getElementsByName('JsTIfied'));
console.log(jstifieds)
jstifieds = jstifieds.splice(-1);
for (let index in jstifieds){
let jstified = jstifieds[index];
console.log(jstified)
if (jstified.height == 0){
jstified.contentWindow.scrollTo(0,420);
jstified.width = 380;
jstified.height = 720;
jstified.style.overflowY = "auto";
jstified.style.overflowX = "auto";
jstified.style.left = "0px";
jstified.style.top = "0px";
jstified.style.position = "relative";
jstified.style.visibility = "visible";
}else{
jstified.contentWindow.scrollTo(0,0);
jstified.width = 0;
jstified.height = 0;
jstified.style.top = "0px";
jstified.style.left = "0px";
jstified.style.position = "relative";
jstified.style.visibility = "hidden";
}
}
}
window.parse_regs = function(str) {
let name = '<span style="background-color: black; color: white;">spud2451</span>';
let search = new Array(
/Copyright 2000-2014 Cemetech & (.*?)<\/a>/gi,
RegExp(name,"gi"),
/<a href="karma:\/\/(.*?)\">(.*?)<\/a>/gi,
/<a href="jstified:\/\/(.*?)\">(.*?)<\/a>/gi,
/<a href="style:\/\/(.*?)\">(.*?)<\/a>/gi,
/<a href="iframe:\/\/(.*?)\">(.*?)<\/a>/gi
);
let replace = new Array(
'Copyright 2000-2014 Cemetech & <a href="mailto:admin@cemetech.net">Kerm Martian</a>',
'<span style="background-color: black; color: white;">'+name+'</span>',
'<b>$2</b><br><button onclick="window.saxClient.sendMessage(\'$2++\');">$2++</button>',
'<iframe width="0" height="0" frameborder="0" scrolling="yes" name="JsTIfied" id="JsTIfied" style="visibility:hidden;left:0;top:0;position:absolute;border:5px solid #000;z-index: 9002;"></iframe><br /><a href="https://www.cemetech.net/projects/jstified" target="JsTIfied" onclick="setTimeout(showjstified,2000);">Show JsTIfied</a>',
'<div style="$1">$2</div>',
'<iframe src="$1" width="640px" height="480px" allowFullscreen>$2</iframe>'
);
for (var i = 0; i < search.length; i++) {
str = str.replaceAll(search[i],replace[i]);
console.log(replace[i]);
}
str += "<style>::selection {background: #000000;color:#ffffff;}::-moz-selection {background: #000000;color:#ffffff;}</style>";
return str;}
window.getimgsrc = function(){
let pcp = document.getElementById("page_content_parent")
pcp.innerHTML = pcp.innerHTML.replaceAll(/<img src="(.*?)">/gi,'<a href="$1"><img src="$1"></a>');
return true;
}
setTimeout(function(){let pcp = document.getElementById("page_content_parent");pcp.innerHTML = parse_regs(pcp.innerHTML);getimgsrc()},2000);
Contact Info
If you have any questions about the script or it functions please email me at spud2451@gmail.com