erome download links

Exposes media-download links for erome media galleries

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey 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 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.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

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 erome download links
// @author Arnold François Lecherche and EromeScriptThrowaway
// @namespace greasyfork.org
// @icon https://www.erome.com/android-chrome-192x192.png
// @version 1.00
// @description Exposes media-download links for erome media galleries
// @include http://erome.com/*
// @include http://*.erome.com/*
// @include https://erome.com/*
// @include https://*.erome.com/*
// @grant none
// @run-at document-end
// @copyright 2020 Arnold François Lecherche
// ==/UserScript==
(function (A, w, d, b) {
  'use strict';
  var v = A.from(d.getElementsByTagName('video'));
  function videoSourceFilter(n) {
    return n.tagName && n.tagName.toLowerCase() === 'source';
  }
  function videoHDFilter(s) {
    return s && s.src && s.getAttribute('label') === 'HD';
  }
  function videoMap(v) {
    var s = A.from(v.childNodes).filter(videoSourceFilter);
    if (s.length === 1) return s[0].src;
    return videoSources.filter(videoHDFilter)[0].src;
  }
  function addLink(s, e) {
    var l = d.createElement('a');
    l.setAttribute('href', s);
    l.download = '';
    l.textContent += s;
    e.parentElement.parentElement.appendChild(l);
    e.parentElement.parentElement.appendChild(d.createElement('br'));
  }
  function init() {
    var i = (v || '').length || 0, s, j;
    while (i--) {
      s = A.from(v[i].childNodes).filter(videoSourceFilter);
      j = s.length;
      while (j--) addLink(s[j].src, v[i]);
    }
    d.removeEventListener('DOMContentLoaded', init, false);
    w.removeEventListener('load', init, false);
  }
  switch (d.readyState) {
    case 'interactive':
    case 'complete':
      init();
      break;
    default:
      d.addEventListener('DOMContentLoaded', init, false);
      w.addEventListener('load', init, false);
  }
})(Array, window, document, document.body || document.getElementsByTagName('body')[0] || document.getElementsByTagName('frameset')[0]);