NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Wordpress.org Plugin Directory Tabs
// @namespace wporg
// @include https://*wordpress.org/plugins/*
// @version 4.0
// @grant none
// @author Nicolas Jonas
// @copyright 2017, Nicolas Jonas
// @homepageURL https://nextgenthemes.com
// @description Adds Buttons to wordpress.org's plugin directory
// @license GPL-3.0
// @updateURL https://openuserjs.org/meta/nextgenthemes/Wordpress.org_Plugin_Directory_Tabs.meta.js
// ==/UserScript==
(function ($) {
'use strict';
// Fixing pixeleted banners. They can't be bothered to do this. New specs for banners are still not released. Otto claimed on the tavern they are only pixeleted on retinas - total bullshit.
var header_css = $('.type-plugin > style').text();
var banner_772 = header_css.match( /https:\/\/[^']+772x250[^']+/ );
var banner_1544 = header_css.match( /https:\/\/[^']+1544x500[^']+/ );
$('.plugin-banner').remove();
$( '<img src="' + banner_772 + '" srcset="' + banner_772 + ' 772w, ' + banner_1544 + ' 1544w" style="margin-top: 1.5625rem" >').prependTo('.type-plugin');
$('<li><a href="#faq">FAQ</a></li>').insertAfter('#tablink-description');
$('<li><a href="#screenshots">Screenshots</a></li>').insertAfter('#tablink-description');
$('<li><a href="' + $('.plugin-donate .button').attr('href') + '">Donate</a></li>').insertAfter('#tablink-support');
//$('.plugin-ratings .button').clone().addClass('button-large tabtab').text('Add Review').appendTo('.tabwrap');
//$('.plugin-donate .button').clone().addClass('button-large tabtab').text('Donate').appendTo('.tabwrap');
}(jQuery));