Blogger post url prefix

It looks like this when I use data:post.url in Blogger; blogname.blogspot.com/2021/01/post-name.html the shape I want to show; /2021/04/post-name.html How can I achieve this?

Current page URl check by JavaScript

I have tried to check the URL by this function. If we use single text then its working, but when we put the URL it’s not working. jQuery(document).ready ( function () { …

Javascript: How to use a unique URL taken from different directories

Sorry if the title is not clear I clarify what I want to do. I have a main.js which is used by all my pages. In this main.js I have some URLs: let’s say var myImgUrl = “/img/thisPicture.png”;…

react-cropper URL insanely long

I’m trying to save cropped images using react-cropper. It seems to work as intended, but the URL that gets saved is crazy long. The console log of the data package alone is often over 100kb, and that’…

JS history.pushState question “skip a slash”

So, if the current url is url.com/x/y if I do history.pushState({“z”:”z”}, “” , “z”), the url will be url.com/x/z How to make it url.com/z ??

Get req params in client Javascript

Say I have a string like http://somerandomwebsite.com/345345/465645456546 This string matches the pattern http://somerandomwebsite.com/:userId/:gameId From the above string, how do I extract the …

How to generate unique urls and pages with template?

I am building a petition site where you can create/join petitions. I have made a page where there is table filled with many pre-created petition titles and I want to make that when people click on any …

How to embed Youtube live chat with url permanent?

The embed URL for a channel’s live stream is: https://www.youtube.com/embed/live_stream?channel=CHANNEL_ID and it works but if I want to embed near at it a YouTube live chat for current streaming …

How to get a File() or Blob() from an URL in javascript?

I try to upload an image to the Firebase storage from an URL (with ref().put(file))(www.example.com/img.jpg). To do so i need a File or Blob, but whenever I try new File(url) it says “not enough …

How do you get the file size of an image on the web page with Javascript?

I’d like to be able to get the file size on an image on a webpage. So let’s say I have an image on the page (that has loaded) like this: How do I call a function in Javascript (or, even better, …