Greasy Fork Links

Add links to navigate to the update tab and links to install scripts

10.07.2016 itibariyledir. En son verisyonu görün.

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.

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        Greasy Fork Links
// @namespace   chriskim06
// @description Add links to navigate to the update tab and links to install scripts
// @include     https://greasyfork.org/en/users/*
// @version     1.3.0
// @grant       none
// @locale      en
// ==/UserScript==

(function() {

  function createSpan(link, text) {
    var el = document.createElement('span');
    el.className = 'name-description-separator';
    el.innerHTML = text;
    link.parentNode.insertBefore(el, link.nextElementSibling);
  }

  var scripts = document.getElementById('user-script-list');
  if (scripts !== null) {
    var items = document.querySelectorAll('#user-script-list > li');
    for (var i = 0; i < items.length; i++) {
      var link = items[i].querySelector('a');
      var el = document.createElement('a');
      el.href = '/en/scripts/' + items[i].dataset.scriptId + '/versions/new';
      el.innerHTML = 'Edit';
      link.parentNode.insertBefore(el, link.nextElementSibling);
      createSpan(link, ' - ');
      el = document.createElement('a');
      el.href = link.href + '/delete';
      el.innerHTML = 'Delete';
      link.parentNode.insertBefore(el, link.nextElementSibling);
      createSpan(link, '/');
      el = document.createElement('a');
      el.href = link.href + '/code/' + link.innerHTML.replace(/ /g, '%20') + '.user.js';
      el.innerHTML = 'Install';
      link.parentNode.insertBefore(el, link.nextElementSibling);
      createSpan(link, ' - ');
      link.href = link.href + '/code';
    }
    scripts.previousElementSibling.querySelector('h3').innerHTML = 'Scripts (' + items.length + ')';
  }

})();