Create an account or sign in to comment.
// ==UserScript==
// @name PMC: Inline Code
// @namespace tampermonkey.net/
// @version 1.0
// @description Add inline code abilities to PMC
// @author ExpertCoder14
// @match *://www.planetminecraft.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
window.addEventListener('load', function() {
$('head').append("<style> code { display: inline; padding: 1px; padding-left: 3px; padding-right: 3px;} br + code {display: block; padding: 10px;}</style>");
}, false);
})();
Reload the page and you'll quickly realize that inline code spans
are awesome!<code>
for a code block, which is a terrible choice. The correct HTML for a code block is <pre>
and the whole meaning for <code> is for inline code.<code style="display: inline;">minecraft:</code>
<span style="font-family: monospace;"></span>
We're a community of 4.4 million creative members sharing everything Minecraft since 2010! Even if you don't post your own creations, we always appreciate feedback on ours.
Create Account Login
Status: Open
Opened by BoyrexMacaraya
Inline code blocks
{
"rewards": {
"function": "minecraft:root"
},
"criteria": {
"tick": {
"trigger": "minecraft:tick",
"conditions": {}
}
},
"requirements": [
[
"tick"
]
]
}
However, attempting to use inline code blocks causes the text below to be shown instead:
A simple workaround is to highlight text in light blue as shown below:
A new text format can be added to support inline code blocks and grant more freedom to creators, and then the existing code block format can be renamed afterwards if appropriate.