Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Button hiding & behaviour + some tweaks #42

Merged
merged 9 commits into from
Nov 30, 2023
Merged

Conversation

drHyperion451
Copy link
Owner

@drHyperion451 drHyperion451 commented Nov 26, 2023

This was sugested by @u-RraaLL inside #41 . But was moved here for convenient reasons.

  • Change the "Last updated" to "Latest script"
  • The buton hides if it's more than 14h
  • Frontend script for getting the yt date from pastefy.
  • Discuss what to do with the youtube date and the ublock date.

Discussions should be placed here.

@u-RraaLL
Copy link
Collaborator

Change the "Last updated" to "Latest script"

Latest solution, but I see the commit has it correctly.

The lastest script should change according to the time. (Don't understand this quite much)

I mean: start checking the release time of the YT script. Display it only when the latest script (new ID) isn't solved yet. Instead of displaying Latest solution.

@drHyperion451
Copy link
Owner Author

drHyperion451 commented Nov 26, 2023

start checking the release time of the YT script.

The problem is I can't do this. Pastely API doesn't let me know the last time the script was modified. So either we ask stephenhawk8054 to move the script from pastely or we cant do this :(

@drHyperion451
Copy link
Owner Author

Btw, here is the pastefy api for the youtube script: https://pastefy.app/api/v2/paste/G1Txv5su

@u-RraaLL
Copy link
Collaborator

Right, I forgot to check. I've left him a message. I'll let you know what he replies.

If it's a no-go, then maybe hide the Latest solution time when the IDs don't match?
Or not? Probably unnecessary if we hide older then 24hrs already.

@drHyperion451
Copy link
Owner Author

I don't know. I don't even know any other good alternative for pastefy that it's free, API is free and has a "modified time" info avaliable in their api.

Also I think it's a good idea to hiide the last tiime updated when it doesn't match because there iis no point of doing do plus sometimes uBlock still works even if they don't match. The >14h hiding option i think it's not good though since it's informative to the user, but I let you guys decide on thiis or open a Poll

@u-RraaLL
Copy link
Collaborator

The >14h hiding option i think it's not good though since it's informative to the user

Are you talking about the button or update time? Or do you mean to not hide the text along the button? In which case we could replace the button with some info like The button is currently hidden. A manual update isn't necessary at this time.

@drHyperion451
Copy link
Owner Author

drHyperion451 commented Nov 27, 2023

i'm talking about the update since time display that appears at the bottom of the banner.

replace the button with some info

That's a good idea actually.

@u-RraaLL
Copy link
Collaborator

i'm talking about the update since time display that appears at the bottom of the banner.

Well, I said 24hrs. But I guess we can probably just stick to no time when IDs mismatch.

@u-RraaLL
Copy link
Collaborator

His reply:

Maybe I can switch to this format with UTC time

https://www.youtube.com/s/desktop/bd3558ba/jsbin/desktop_polymer.vflset/desktop_polymer.js - 2023-11-27 05:27+00:00

@drHyperion451
Copy link
Owner Author

His reply:

Maybe I can switch to this format with UTC time

https://www.youtube.com/s/desktop/bd3558ba/jsbin/desktop_polymer.vflset/desktop_polymer.js - 2023-11-27 05:27+00:00

This is perfect. He can start right now using this format (it's compatible with my current script)


// Date
//let dateYoutubeId = new Date(infoParts[1])
let dateYoutubeId = new Date('2023-11-27 05:27+00:00')
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main get logic is already implemented. There is a placeholder inside this comment that will be deleted to avoid errors for now until stephenhawk8054 updates the pastefy. A web designer will be good in this situations to decide where to put this info now.

@drHyperion451 drHyperion451 added enhancement New feature or request help wanted Extra attention is needed js Issue reegarding JavaScript labels Nov 27, 2023
@drHyperion451
Copy link
Owner Author

drHyperion451 commented Nov 29, 2023

This last commit fixes #40

@u-RraaLL Sorry for bothering you but this is going to be merged very soon. I want to make sure I have all things clear.

Now it can fetch the youtube date as well as the ublock date.

What should we do with this info? What date should be displayed and when exactly? Also @stephenhawk8054 thanks for updating the pastefy.

@u-RraaLL
Copy link
Collaborator

If IDs match, display Latest solution: {pastTenseTime}.

If IDs don't match, display YT script changed: {pastTenseTime}.

@drHyperion451 drHyperion451 marked this pull request as ready for review November 30, 2023 19:31
@drHyperion451 drHyperion451 merged commit cfc1a52 into dev Nov 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed js Issue reegarding JavaScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants