YoutubeNonStop - Autoclicker for Youtube's latest "feature" - Video paused. Continue watching?

General discussion, compatibility and contributed extensions.

Moderators: FranklinDM, Lootyhoof

Post Reply
own3mall
Apollo supporter
Apollo supporter
Posts: 38
Joined: 2014-10-22, 00:32
Location: USA

YoutubeNonStop - Autoclicker for Youtube's latest "feature" - Video paused. Continue watching?

Post by own3mall » 2020-04-21, 20:29

Not sure if the community already had a solution, but I decided to backport the YoutubeNonStop plugin from the new web extension format to the old way (which Pale Moon supports).

https://github.com/own3mall/YoutubeNonS ... 7.1.legacy

I've been using it since I built it this morning, and I haven't seen the paused video screen.

This is the first time I've done anything with extensions, so I hope I did it correctly. :)

-----------------------------------------------------------------------
Edit, this still doesn't seem to be working... not sure why.

own3mall
Apollo supporter
Apollo supporter
Posts: 38
Joined: 2014-10-22, 00:32
Location: USA

Re: YoutubeNonStop - Autoclicker for Youtube's latest "feature" - Video paused. Continue watching?

Post by own3mall » 2020-04-21, 23:01

Hmm, ok, clearly I don't know what I'm doing, but I'd love to learn when it comes to extensions.

Anyone know what would need to be done to convert that extension to the Pale Moon equivalent?

I've been looking at this documentation:

https://developer.mozilla.org/en-US/doc ... _extension

Would a window.addEventListener be used to run the code in the autoconfirm.js file assuming the url of the page matches youtube? Do console.log calls in legacy extensions show up in Pale Moon? Is there documentation on developing addons specifically for Pale Moon?

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2396
Joined: 2015-12-09, 15:45

Re: YoutubeNonStop - Autoclicker for Youtube's latest "feature" - Video paused. Continue watching?

Post by moonbat » 2020-04-22, 03:24

For a general intro to XUL extensions, there's the XUL school tutorial, and of particular interest is the section on intercepting page loads.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

own3mall
Apollo supporter
Apollo supporter
Posts: 38
Joined: 2014-10-22, 00:32
Location: USA

Re: YoutubeNonStop - Autoclicker for Youtube's latest "feature" - Video paused. Continue watching?

Post by own3mall » 2020-04-22, 15:28

Thanks! I've got a script that contains the following in the xpi:

Code: Select all

window.addEventListener("load", function () {
	gBrowser.addEventListener("load", onPageLoad, true);
}, false);


function onPageLoad(event){
	// this is the content document of the loaded page.
	let doc = event.originalTarget;

	if (doc instanceof HTMLDocument) {
		// is this an inner frame?
		if (doc.defaultView.frameElement) {
			// Frame within a tab was loaded.
			// Find the root document:
			while (doc.defaultView.frameElement) {
				doc = doc.defaultView.frameElement.ownerDocument;
			}
		}
	}
	
	let myRegexp = /(?:https?:\/\/)?(?:youtu\.be\/|(?:www\.|m\.)?youtube\.com\/(?:watch|v|embed)(?:\.php)?(?:\?.*v=|\/))([a-zA-Z0-9\-_]+)/g;
	if (myRegexp.test(doc.defaultView.location.href)){
		console.log('initializing the plugin');
	}
};

Any idea why I'm not getting a console message of "initializing the plugin" when visiting a YouTube page? How do I debug that my extension is actually working? I'm assuming I can reuse the code from the web extensions YoutubeNonStop plugin by wrapping the initialization code in a function that is called once the regex matches in my above script? Or is it not that simple?



User avatar
Lootyhoof
Themeist
Themeist
Posts: 1455
Joined: 2012-02-09, 23:35
Location: United Kingdom

Re: YoutubeNonStop - Autoclicker for Youtube's latest "feature" - Video paused. Continue watching?

Post by Lootyhoof » 2020-04-30, 17:34

If it works as you'd expect, why not submit it to our add-ons site so others can enjoy it? :)

https://addons.palemoon.org/panel

own3mall
Apollo supporter
Apollo supporter
Posts: 38
Joined: 2014-10-22, 00:32
Location: USA

Re: YoutubeNonStop - Autoclicker for Youtube's latest "feature" - Video paused. Continue watching?

Post by own3mall » 2020-04-30, 18:45

I will, but I need to make sure it's good before I submit it officially.

Still doing some more testing.

own3mall
Apollo supporter
Apollo supporter
Posts: 38
Joined: 2014-10-22, 00:32
Location: USA

Re: YoutubeNonStop - Autoclicker for Youtube's latest "feature" - Video paused. Continue watching?

Post by own3mall » 2020-05-13, 22:11

Just to let everyone know, it's been released officially:

https://addons.palemoon.org/addon/youtube-nonstop/

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 8281
Joined: 2012-10-09, 19:37
Location: The factory in Neuconsin

Re: YoutubeNonStop - Autoclicker for Youtube's latest "feature" - Video paused. Continue watching?

Post by New Tobin Paradigm » 2020-05-14, 06:58

Nice.
Not so much safety first as it is stupidity last.
Image

own3mall
Apollo supporter
Apollo supporter
Posts: 38
Joined: 2014-10-22, 00:32
Location: USA

Re: YoutubeNonStop - Autoclicker for Youtube's latest "feature" - Video paused. Continue watching?

Post by own3mall » 2020-11-04, 23:38

I just wanted to say that I've released a new version that I feel like works the best of any I've created previously. Please update for a better experience :)

User avatar
Bilbo47
Apollo supporter
Apollo supporter
Posts: 47
Joined: 2017-11-18, 04:24

Re: YoutubeNonStop - Autoclicker for Youtube's latest "feature" - Video paused. Continue watching?

Post by Bilbo47 » 2020-11-17, 19:01

@Moonbat: Is the XUL school tutorial hosted anywhere other than Mozilla? Because that page will disappear, and sooner than anyone would like.

User avatar
Isengrim
Board Warrior
Board Warrior
Posts: 1296
Joined: 2015-09-08, 22:54
Location: 127.0.0.1
Contact:

Re: YoutubeNonStop - Autoclicker for Youtube's latest "feature" - Video paused. Continue watching?

Post by Isengrim » 2020-11-17, 20:00

Bilbo47 wrote:
2020-11-17, 19:01
@Moonbat: Is the XUL school tutorial hosted anywhere other than Mozilla? Because that page will disappear, and sooner than anyone would like.
One enterprising user made a copy of sorts of the MDN "archive" pages, including that tutorial. https://udn.realityripple.com/docs/Archive/Add-ons/Overlay_Extensions/XUL_School
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story

Post Reply