New feature: QR codes

With the growing demand for feedback of apps on smartphones, I added a QR tag to the UBB tag list, powered by the Google Charts API.

Usage:
[ QR ] message [/ QR ]
[ QR ] url [/ QR ]

Example:
[QR]QR codes are overrated[/QR]

Nice one Riven.

Cas :slight_smile:

Set the alt and title attributes of the image to the text of the message.

Ok, I’ll give a shiny penny to the first person who can QR a message which makes a picture. ;D

[QR]Riven is too creative and has too much time on his hands. :D[/QR]

Right click => View Image => “http://chart.apis.google.com/chart?cht=qr&chs=350x350&chl=Riven+is+too+creative+and+has+too+much+time+on+his+hands.+%3AD

It’s nice that I don’t need a QR reader to read them.

;D ;D

[QR]I don’t own a smartphone, but this is awesome! We should all post only with these! It will be awesome! We will transcend to a new level nerdiness! Let’s do this, guys![/QR]

I refuse. :clue:

[QR]Calm your tits.[/QR]

But they are so perky and active.

[QR]BAHAHAHAHAHAHAHAH!!![/QR]

[QR]That’s what SHE said![/QR]

[QR]Wouldn’t it be he?[/QR]

[QR]No, she was the one laughing.[/QR]

If it turns out to be needed, I will disable the QR tag for specific members :cranky:


// ==UserScript==
// @id             www.java-gaming.org-3dfa1163-bb02-4059-b3d1-c11863ffbbe0@scriptish
// @name           QR Code textual form
// @version        1.0
// @namespace      
// @author         
// @description    
// @include        http://www.java-gaming.org/topics/*
// @run-at         document-end
// ==/UserScript==

function decode(str) {
    return unescape(str.replace(/\+/g, " "));
}

var imgTags = document.getElementsByTagName("img");
for (imgTag in imgTags) {
    var tag = imgTags[imgTag];
    var srcAttribute = tag.getAttribute("src");
    if (srcAttribute.indexOf("http://chart.apis.google.com/") == 0) {
        var getTextual = decode(srcAttribute.split("chl=")[1]);
        var newSpan = document.createElement("span");
        newSpan.innerHTML = "
QR TEXT: 
" + getTextual + "
";
        tag.parentNode.appendChild(newSpan);
    }
}

:stuck_out_tongue:

Well, yes. I will just fix it serverside :slight_smile:

I apologize for my rudeness and misuse of the QR-tag, o great Riven. I will immediately cease my misuse of this greater form of communication, as I value my ability to post funny lines encrypted in images.

[QR]Sowwwwwy :([/QR]