Skip to content

Instantly share code, notes, and snippets.

Avatar

GeonoTRON2000 GeonoTRON2000

View GitHub Profile
@GeonoTRON2000
GeonoTRON2000 / font.js
Created Jul 29, 2017
Parse a BBCode [font=] tag
View font.js
var apply = document.getElementsByClassName("postmsg");
var sigs = document.getElementsByClassName("postsignature");
var i;
for (i = 0; i < sigs.length; i++) {
apply[apply.length] = sigs[i];
}
var fonts = [];
var texts = [];
@GeonoTRON2000
GeonoTRON2000 / youtube.js
Created Jul 29, 2017
Parse a [youtube]videoID[/youtube] or [youtube]videoURL[/youtube] BBCode tag
View youtube.js
var posts = document.getElementsByClassName("postmsg");
// don't allow videos in signatures
var j;
for (j = 0; j < posts.length; j++) {
var thishtml = posts[i].innerHTML;
var i;
var vids = [];
for (i = 0; i < thishtml.split("[youtube]").length-1; i++) {
@GeonoTRON2000
GeonoTRON2000 / scratchproj2.js
Last active Jul 29, 2017
Allow Scratch 1.4 projects to be embedded in BBcode
View scratchproj2.js
// Usage: [scratch=flash|java]author/projectID[/scratch]
var j;
var posts = document.getElementsByClassName("postmsg");
for (j = 0; j < posts.length; j++) {
var post = posts[j];
if (post.parentElement.parentElement.parentElement.parentElement.className == "blockpost rowodd firstpost") {
var thishtml = post.innerHTML;
var javas = [];
var i;
@GeonoTRON2000
GeonoTRON2000 / scratchproj3.js
Created Jul 29, 2017
Allow a Scratch 2.x project to be embedded in BBcode
View scratchproj3.js
// Usage: [scratch]projectID[/scratch]
var posts = document.getElementsByClassName("postmsg");
var pattern = /\[scratch\]([0-9]+)\[\/scratch\]/gi;
for (var i = 0; i < posts.length; i++) {
var post = posts[i];
post.innerHTML = post.innerHTML.replace(pattern, "<iframe allowtransparency=\"true\" width=\"485\" height=\"402\" src=\"http://scratch.mit.edu/projects/embed/$1/\" frameborder=\"0\" allowfullscreen></iframe>");
}
@GeonoTRON2000
GeonoTRON2000 / flash.js
Created Jul 29, 2017
Parse a [flash] BBCode
View flash.js
// Usage: [flash=width,height]swf_url[/flash]
var body = document.getElementsByTagName("body")[0];
body.innerHTML = body.innerHTML.replace(/\[flash=([0-9]+),([0-9]+)\]((mailto\:|(news|(ht|f)tp(s?))\:\/\/){1}\S+)\[\/flash\]/gi, '<object type="application/x-shockwave-flash" data="$3" width="$1" height="$2"><embed type="application/x-shockwave-flash" width="$1" height="$2" src="$3" /></object>');
@GeonoTRON2000
GeonoTRON2000 / buynow.js
Created Jul 29, 2017
A plugin to allow users to insert functional "Buy Now" buttons into a forum using Cash Mod.
View buynow.js
var me = document.getElementById("brdwelcome").getElementsByTagName("strong")[0].innerHTML;
var j;
var posts = document.getElementsByClassName("postmsg");
for (j = 0; j < posts.length; j++) {
var post = posts[j];
var thishtml = post.innerHTML;
var buttons = [];
var i;
for (i = 0; i < thishtml.split("[buynow]").length-1; i++) {
buttons[i] = thishtml.split("[buynow]")[i+1].split("[/buynow]")[0];
@GeonoTRON2000
GeonoTRON2000 / externaltbgblocks.js
Last active Jul 29, 2017
A jokey Scratchblocks imitation for the TBG forums
View externaltbgblocks.js
/*
TBG Blocks Plugin
Author: GeonoTRON2000
Version: 1.0
This versions is for being imported across domains.
*/
TBGBlocks = {
parse: function(settings) {
@GeonoTRON2000
GeonoTRON2000 / fishmarket.user.js
Created Jul 31, 2017
Exchange fish (the currency) for goods on any forum site using BBCode tags.
View fishmarket.user.js
// This is a placeholder in order to generate the gist URL.
@GeonoTRON2000
GeonoTRON2000 / ScratchStyle.css
Created Oct 25, 2020
Modern FluxBB style to give the original feel of the 1.4-era Scratch Forums.
View ScratchStyle.css
/*****************************************************************
1. INITIAL SETTINGS
*****************************************************************/
div.postsignature{
max-height: 130px;
}
p.modlist {
display: none;
}
@GeonoTRON2000
GeonoTRON2000 / Pingu.css
Created Oct 25, 2020
Pingu: A theme for FluxBB similar to the Scratch 1.4-era forum feel, but in an icy color scheme and stylized for the Antarctic.
View Pingu.css
/*****************************************************************
1. INITIAL SETTINGS
*****************************************************************/
div.postsignature{
max-height: 130px;
}
p.modlist {
display: none;
}
You can’t perform that action at this time.