CSC Autoscroll

Automatically scroll on cocksizecontest main page

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        CSC Autoscroll
// @description Automatically scroll on cocksizecontest main page
// @namespace   cocksizecontest.com
// @include     https://www.cocksizecontest.com/
// @include     https://www.cocksizecontest.com/#*
// @version     1
// @grant       none
// ==/UserScript==

var autoscrollTimeout = null;

window.addEventListener('scroll', function() {
  if (autoscrollTimeout) {
    clearTimeout(autoscrollTimeout);
  }
  autoscrollTimeout = window.setTimeout(function() {

    // window.scrollTop + window.innerHeight == lowest pixel viewable
    // subtract document.height to get how much is left below the page
    //console.log("scrollTop: " + window.scrollY);
    //console.log("innerHeight: " + window.innerHeight);
    //console.log("height: " + document.body.scrollHeight);
    if (document.body.scrollHeight < 500) {
      return;
    }
    var remaining = document.body.scrollHeight - (window.scrollY + window.innerHeight);
    if (remaining < 500) {
      var link = document.querySelector('.cscMoreFeedLink > a[href]');
      if (link) {
        link.click();
      }
    }
    
  }, 300);
});