What have you always wanted to do in a welcome message?


You can’t link to that font as dafont.com goes to a lot of effort to prevent hot linking. Your best bet is to download the font, unzip the file, and then stick it in a Github repo. You can then use something like rawgit.com to embed the font in your welcome message.


Took me a bit to get around to it - but I added a menu like the Message Bot uses. There’s a new preset for it :slight_smile:

KP7 now has a guide for the icons - after that it’s just setting the width to 100% and the padding to 0.5em or so. Welcome Message Icons


I really want to be able to remotely edit the headers for all the welcome messages i have created.
ie. being able to read from a github pages text file and automatically insert it into the head, or a div, of my welcome messages.


That’s actually pretty easy :wink:

Example: Getting the style page I use for the WM Fiddle

  .then(r => r.text())

Example: Inserting the css into a new style element

  .then(r => r.text())
  .then(css => {
    document.head.appendChild(document.createElement('style')).innerHTML = css

Unfortunately, fetch is only supported with new browsers, so iOS 8 for example won’t work. (Really, anything under 10.3) Thankfully, a simple polyfill fixes this. Add it before your script to get stuff.

<script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/2.0.3/fetch.min.js"></script>


i already know how to insert css (plus there’s a easier way to do it -
<link rel="stylesheet" href="https://derpmarine168.github.io/blockheads/Standard.css" />)

but what i want is to be able to make uniform the header of all my pages.
for example, i want to be able to insert
into a p tag with the id notices.

and inset this:

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://derpmarine168.github.io/blockheads/Standard.css" /> 

into the bottom of my head element, or inside a div.

or if i was building a website, being able to insert the header or footer from another master document.


I can do that for you


I just used that as an example, inserting your notice also pretty easy. WM Fiddle

<p id="notices">Loading...</p>

  	.then(function (r) { return r.text() })
    .then(function (notice) {
      document.getElementById('notices').textContent = notice

Inserting this is really easy… there are a few ways you could do it. This is probably the simplest:

document.head.innerHTML += '<meta name="viewport" content="width=device-width, initial-scale=1.0">\n
<link rel="stylesheet" href="https://derpmarine168.github.io/blockheads/Standard.css" /> '


Thanks so mutch! There are a million and one applications for this.


If possible could you make these buttons go on the image instead of below and possibly text on the image at the same time and the buttons a tad bit round. Including the show more info button.

Could you possibly do this massive request?
edit: this has already been done.


put this in the style for the buttons:

position: relative;
    left: 3px;
    top: 3px;

change the px up until the buttons overlay.
sorry if i’m not that helpful, but i can’t do more unless you send me your code.


i can admin you and clone the code if you wish and make you admin to do your work.


il join.
edit: send me a invite please, as i cant find it on the server list.


i lifted the whitelist and set it to search for you. any players that try to join except for you and the admins will be kicked


oh thanks!
but it’s still not coming up
found it


no problem


is there a way to change the title tags with a similar script to the second example? and does that actually affect the title of the welcome message?


Is it possible that I could do a slideshow without affecting the image size or the contents within?


Sorry about that, I must have missed this in the rush of threads yesterday.

You can change the title tags, but it won’t change the title displayed in the popup.

document.head.querySelector('title').textContent = "Hello"

This should be fairly easy to do - can you send the HTML structure you use? Might slightly change how the script needs to work.


thanks. that’s what i tried, was wondering if i was wrong. :glasses:


Whole welcome message or image, button and text?