WordPress.org Plugins Enhancements

Adds a SVN link to the end of the "Contributors & Developers" section of a WordPress plugin listing.

Stan na 25-04-2017. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        WordPress.org Plugins Enhancements
// @namespace   r-a-y/wporg/svn
// @include     https://wordpress.org/plugins/*
// @version     1.0.1
// @grant       none
// @description Adds a SVN link to the end of the "Contributors & Developers" section of a WordPress plugin listing.
// ==/UserScript==

var a = document.createElement('a'),
    sections = document.querySelectorAll('.section'),
    readMore = document.querySelectorAll('.section-toggle'),
    i = 0;

// Set up link for SVN repo.
a.setAttribute('href','https://plugins.svn.wordpress.org/' + wporgLocaleBanner.currentPlugin);
a.innerHTML = 'SVN repository';

// Add link to "Interested in Development?" section.
document.querySelector('.plugin-development').appendChild( a );

// Show all hidden content.
for( i; i < sections.length;i++ ) {
	sections[i].classList.remove('read-more');
}

// Remove all "Read More" links.
i = 0;
for( i; i < readMore.length;i++ ) {
	readMore[i].style.display = 'none';
}