JS shows $$ in media player

Yes, there should only be one version of jquery.
I guess the latest would be best, though javascript isn’t my specialty.
The same goes for font-awsome-min.css, it should only be loaded once.

1 Like

Ok, let me try eliminating them and the font-awesome-min.css and see what happens…

Got those eliminated to just one of each. Anything else I need to eliminate?

@DaveMaxwell is saying that this

<html lang="en" xml:lang="en">

Should be in the head

<head prefix="og: https://ogp.me/ns# fb: https://ogp.me/ns/fb# blog: https://ogp.me/ns/blog#">

Ok done. For this ,

I don’t have anything after <html lang="en" xml:lang="en" class="hasJS"> . In fact my html lang is only as <html lang="en" xml:lang="en"> not class="hasJS"

And I don’t see the JS that’s being loaded twice…

I found this

<html class="hasJS" xml:lang="en" lang="en">

in DevTools, but when I paste it as OuterHTML, it comes with a handful of stuff, and it’s kinda long, so I just wanted to show you that this was in there.

Paul said that there’s an error in this

{"@type":"ItemList","url":"https:\/\/iwriteonwheels.tumblr.com","itemListElement":[{"@type":"ListItem","position":1,"url":"https:\/\/iwriteonwheels.tumblr.com\/post\/643589604549787648\/new-additions-pt-2-blog"}],"@context":"https:\/\/schema.org"}

where it’s giving an unexpected token ':'

Not sure what to do here.

I can edit some of the code in devtools, but the ones that are there and not in Tumblr. But I can’t save in devtools as you said, so I don’t know how this is going to work out.

Wow! I am super impressed that you are addressing the issues and it is having such a large effect already. The site is loading much quicker. Keep it up!

You have a file being loaded from https://doc-0o-a8-docs.googleusercontent.com/docs/securesc/… What is that about and if you can axe that, things will be looking really good for your site. That resource is 1.5-1.8MB alone and will cut your page weight by like 15%.

Btw, with each redundant script you are removing and file you are getting rid off, the closer we are to finding out where the number thing on the player is going wrong since we have less code to dig through.

Keep it up!

Edit: I am seeing redundant exceptions.js, header.build.js and index.build.js. Maybe see if you can trim those down too.

1 Like

Found it! You have some JS in the page that I believe is a react element called lottie-web. It is a react component in there for the audio player. It has a calculateTime function in it. This is what it looks like…

See how the function is calculating the number of minutes and seconds and is returning these dollar signs which I think they want to be interpolation values? Maybe change that function to look like this instead…

const calculateTime = (secs) => {
   const minutes = Math.floor(secs / 60);
   const seconds = Math.floor(secs % 60);
   const returnedSeconds = seconds < 10 ? `0${seconds}` : `${seconds}`;
   return `${minutes}:${returnedSeconds}`;
}

So look for this segment of code. It is being embedded in the page as a <script type='module'> tag in your page. Make the edits above and then give it a try again.

4 Likes

Nicely done @Martyr2 :+1:

For the OP, here is documentation on template strings.

2 Likes

Wow thanks guys! :smiling_face_with_tear:. I really appreciate the encouragement and help. I’m trying so hard. I hope whatever I am doing in the devtools stays that way and reduces the load time. I have noticed a big difference too! :grin:

Found it! You have some JS in the page that I believe is a react element called lottie-web. It is a react component in there for the audio player. It has a calculateTime function in it. This is what it looks like…

@Martyr2 is that the file you mentioned being downloaded from that link? The doc-0o-a8…etc etc?

Edit: I am seeing redundant exceptions.js, header.build.js and index.build.js.

Where is this at?

I can’t seem to find the https://doc-0o-a8-docs.googleusercontent.com/docs/securesc/ anywhere

:frowning:

Think I found this

https://assets.tumblr.com/client/prod/standalone/tumblelog/index.build.js?_v=0c38ea772dfcf026d9fa4f6245753118

which is being repeated like 2-3 times lol

Ok these two

Screenshot 2023-03-25 at 11-22-24 Customize Tumblr

and

Screenshot 2023-03-25 at 11-22-52 Customize Tumblr

I think are what @Martyr2 is mentioning…but I don’t know what to do with em.

I have put this

const calculateTime = (secs) => {
   const minutes = Math.floor(secs / 60);
   const seconds = Math.floor(secs % 60);
   const returnedSeconds = seconds < 10 ? `0${seconds}` : `${seconds}`;
   return `${minutes}:${returnedSeconds}`;
}

but it keeps reverting back to

const calculateTime = (secs) => {
        const minutes = Math.floor(secs / 60);
        const seconds = Math.floor(secs % 60);
        const returnedSeconds = seconds < 10 ? `0$` : `$`;
        return `$:$`;
      }

Any ideas? :thinking: I have done just about all the above steps everyone mentioned, except not sure about the one I shared about half hour ago with the screen shots from my blog ^^^ (green texted)…

I have done this in my blog, but can’t in devtools…

I’m having nightmares… the build.js stuff I have gone through with Delete Node… yet it comes back… idk what’s going on… I need someone to tell me how this is all looking so far…