You are viewing a single thread.
View all comments
10 points
*

Uhm, if the owner of the site is here, the “random” button presents you with an xml.

permalink
report
reply
1 point

Not for me. Did you maybe find an easter egg?

permalink
report
parent
reply
7 points
*

Oh right, i have third-party scripts blocked by default on mobile. Now it works.

Still, uh, why was it made that way, that it needs JS to random-load a page?

permalink
report
parent
reply
9 points

Without JS the button points to the RSS feed. This serves as a placeholder. The button was most likely copied and pasted.

Upon page load the website makes a call to the /rand.php endpoint, which returns a date in ISO8601 format. That is then used to produce the actual link.

				<script>
		$.get("/rand.php",function(data){
			$('.cc-navaux').attr('href','https://www.smbc-comics.com/comic/' + data);
		});
		</script>

(lines 172ff. of the HTML source) Why? Ask the author.

permalink
report
parent
reply

Comic Strips

!comicstrips@lemmy.world

Create post

Comic Strips is a community for those who love comic stories.

The rules are simple:

  • The post can be a single image, an image gallery, or a link to a specific comic hosted on another site (the author’s website, for instance).
  • The comic must be a complete story.
  • If it is an external link, it must be to a specific story, not to the root of the site.
  • You may post comics from others or your own.
  • If you are posting a comic of your own, a maximum of one per week is allowed (I know, your comics are great, but this rule helps avoid spam).
  • The comic can be in any language, but if it’s not in English, OP must include an English translation in the post’s ‘body’ field (note: you don’t need to select a specific language when posting a comic).
  • Politeness.
  • Adult content is not allowed. This community aims to be fun for people of all ages.

Web of links

Community stats

  • 11K

    Monthly active users

  • 2.4K

    Posts

  • 31K

    Comments

Community moderators