aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/content.js b/content.js
index 977f170..ab42080 100644
--- a/content.js
+++ b/content.js
@@ -18,16 +18,10 @@ function init_mutation_observer (player) {
for (var i = 0; i < mutation_list.length; i++) {
var mutation = mutation_list[i];
- console.log(
- mutation.target.className +
- '\n' +
- mutation.oldValue
- );
-
- if (mutation.target.classList.includes('postplay')) {
- mutation.target.classList = mutation.target.classList.filter(function(c) {
- return c !== 'postplay';
- });
+ if (mutation.target.classList.contains('postplay')) {
+ mutation.target.classList.remove('postplay');
+
+ return;
}
}
});
@@ -43,5 +37,7 @@ function init_mutation_observer (player) {
with_player(function(player) {
+ window.player = player;
+
init_mutation_observer(player);
});