NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

// ==UserScript==
// @name SEGE Video Smart Speed Control (1x→5x→13x→1x) + AntiPause + AutoNext + Reload + Alt+5
// @namespace http://tampermonkey.net/
// @version 2.9
// @description Videoyu 1x başlat, 5x sonra 13x yap, bitime 10sn kala tekrar 1x'e dön. Anti-pause, Alt+5, auto-next ve süre değişirse reload. Sistem fark etmez.
// @author ChatGPT
// @match https://aday.segem.org.tr/*
// @grant none
// ==/UserScript==

(function () {
'use strict';

// --- görünürlük ve odak koruması ---
function overrideVisibilityAndFocus() {
Object.defineProperty(document, 'hidden', { get: () => false });
Object.defineProperty(document, 'visibilityState', { get: () => 'visible' });
document.dispatchEvent(new Event('visibilitychange'));
}

// --- fare hareketi simülasyonu ---
function keepMouseActive() {
setInterval(() => {
document.dispatchEvent(new MouseEvent('mousemove'));
}, 4000);
}

// --- video hız kontrolü ---
function makeVideoSmartSpeed(video) {
if (!video) return;

const realSetter = Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'playbackRate').set;

// playbackRate değişimini gizle
Object.defineProperty(video, 'playbackRate', {
get: () => 1.0,
set: (val) => {
if (val !== video._targetRate) realSetter.call(video, val);
}
});

// Başlangıç hızı
video._targetRate = 1.0;
realSetter.call(video, video._targetRate);
console.log("🎬 Başlangıç: 1x hız.");

// 3 saniye sonra 5x
setTimeout(() => {
video._targetRate = 5.0;
realSetter.call(video, video._targetRate);
console.log("⚡ 5x hız aktif.");
}, 3000);

// 6 saniye sonra 13x
setTimeout(() => {
video._targetRate = 13.0;
realSetter.call(video, video._targetRate);
console.log("🚀 13x hız aktif.");
}, 6000);

// sürekli kontrol: pause olursa play yap, hız düşerse düzelt
setInterval(() => {
if (video.paused || video.ended) video.play().catch(() => {});

// bitime 10sn kala tekrar 1x'e dön
if (video.duration && video.currentTime >= video.duration - 10) {
if (video._targetRate !== 1.0) {
video._targetRate = 1.0;
realSetter.call(video, video._targetRate);
console.log("🎯 Bitime 10sn kaldı → hız 1x'e döndü.");
}
}

// playbackRate düzelt
if (video.playbackRate !== video._targetRate) {
realSetter.call(video, video._targetRate);
}
}, 1000);
}

// --- Alt+5 ile sona sar ---
function setupShortcuts(video) {
window.addEventListener('keydown', (e) => {
if (e.altKey && e.key === '5') {
video.currentTime = video.duration;
console.log("⏩ Alt+5 ile sona sarıldı.");
}
});
}

// --- otomatik next ---
function autoClickNextIfVisible() {
const nextBtn = document.querySelector('a.nextBtn.btn.btn-success.btn-sm');
if (nextBtn && nextBtn.offsetParent !== null) {
console.log("➡️ Next butonu göründü, otomatik tıklanıyor.");
nextBtn.click();
}
}

// --- süre değişirse reload ---
function watchDurationAndReload() {
let lastDuration = null;
setInterval(() => {
const durationSpan = document.querySelector('.vjs-duration-display');
if (durationSpan) {
const currentDuration = durationSpan.textContent.trim();
if (lastDuration && currentDuration !== lastDuration) {
console.log(`🔄 Süre değişti: ${lastDuration} → ${currentDuration}, sayfa yenileniyor.`);
location.reload();
}
lastDuration = currentDuration;
}
}, 2000);
}

// --- video hazır olana kadar bekle ---
function waitForVideo() {
const video = document.querySelector('video');

if (video) {
video.muted = true;
video.play().catch(() => {});
overrideVisibilityAndFocus();
keepMouseActive();
makeVideoSmartSpeed(video);
setupShortcuts(video);
watchDurationAndReload();

console.log("✅ SEGE video aktif: 1x → 5x → 13x → (bitime 10sn kala) 1x + anti-pause + Alt+5 + auto-next.");
setInterval(autoClickNextIfVisible, 1000);
} else {
setTimeout(waitForVideo, 1000);
}
}

waitForVideo();
})();
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.