Comments (4)
This has already been resolved in 3d12b80
But my current way of doing it is undesirable and I never even considered popstate. I will look into using this instead of relaying on an interval
from alientube.
The popstate is not being fired nor is the history being manipulated. Are you sure YouTube is even doing this?
from alientube.
Hmm, I can't think of any other way that YouTube would modify the page address without triggering a reload... I will investigate.
from alientube.
I'm not used to doing this sort of thing so I could be wrong, but it appears that the ytbuffer object is responsible for these pageloads. I found the following code which appears to manage the queue, but I can't find the code that actually does the page loading.
var lg = function () {
var a = window.ytbuffer;
if (a) {
if (a = a.bufferedClick) {
window.document.removeEventListener ? window.document.removeEventListener("click", window.ytbuffer.handleClick, !1) : window.document.detachEvent("onclick", window.ytbuffer.handleClick);
var b = (0, m.N)("yt-is-buffered");
(0, m.A)(b, function (a) {
(0, m.M)(a, "yt-is-buffered")
});
(0, m.kg)(a.target || a.srcElement, "click");
(0, m.Ff)("buffer_click", (0, m.Af)({
page_name: (0, m.v)("PAGE_NAME")
}))
}(0, m.Wc)("ytbuffer")
}
};
(0, m.Ba)() ? this.b.push((0, m.Da)(Sk)) : Sk();
(0, m.Ba)() ? this.b.push((0, m.Da)(Yr, 200)) : Yr();
(0, m.Ba)() ? this.b.push((0, m.Da)(m.un)) : (0, m.un)();
try {
if (window.ytbuffer && window.ytbuffer.queue) {
for (var e = window.ytbuffer.queue, a = 0; 5 > a && a < e.length; a++) {
var g = e[a],
h = g.target || g.srcElement;
(0, m.Hf)((0, m.Af)({
a: "buffer_events",
event_index: a,
clientX: g.clientX,
clientY: g.clientY,
localName: h.localName,
className: h.className,
id: h.id,
page_name: (0, m.v)("PAGE_NAME")
}))
}
window.document.removeEventListener ? window.document.removeEventListener("click",
window.ytbuffer.enqueueEvent, !1) : window.document.detachEvent("onclick", window.ytbuffer.enqueueEvent);
(0, m.Wc)("ytbuffer")
}
} catch (k) {}
try {
var ytbuffer = {};
ytbuffer.bufferedClick;
ytbuffer.handleClick = function (e) {
var element = e.target || e.srcElement;
while (element.parentElement) {
if (element.className.match(/^yt-can-buffer$|^yt-can-buffer | yt-can-buffer$| yt-can-buffer /)) {
ytbuffer.bufferedClick = e;
element.className += ' yt-is-buffered';
break;
}
element = element.parentElement;
}
};
if (document.addEventListener) {
document.addEventListener('click', ytbuffer.handleClick);
} else {
document.attachEvent('onclick', ytbuffer.handleClick);
}
} catch (e) {}
from alientube.
Related Issues (20)
- NET::ERR_CERT_COMMON_NAME_INVALID
- Did you plan to release alientube to the firefox's store? HOT 1
- Cannot post comment: Cannot read property 'commentThread' of undefined HOT 2
- Adding subreddits to exclude does not work on chrome 49.0.2623.87
- Alientube doesn't work upon viewing a "new" YouTube video
- Filter out subreddits HOT 1
- Not pulling all subreddits?
- How do I see youtube comments? HOT 2
- Is this still coming to Safari? HOT 1
- Reproducible: Any Youtube URL that starts with a - will not load reddit comments HOT 4
- This is the official discussion for this video HOT 1
- Broken with the latest youtube update
- Change the website URL to point at this github readme HOT 1
- Option to only show parent reddit comments?
- Show reddit votes on subscription page
- Official website is spam HOT 3
- Broken in YouTube Beta HOT 22
- alientube.co is broken
- Seems to be broken again?
- Alientube broken by Youtube comments update HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alientube.