Greasy Fork 支持简体中文。

WordPress.org Plugins Enhancements

Enhancements to the wordpress.org plugins repository after the 2017 redesign.

  1. // ==UserScript==
  2. // @name WordPress.org Plugins Enhancements
  3. // @description Enhancements to the wordpress.org plugins repository after the 2017 redesign.
  4. // @namespace r-a-y/wporg/svn
  5. // @include https://wordpress.org/plugins/*
  6. // @version 1.0.1
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. var a = document.createElement('a'),
  11. sections = document.querySelectorAll('.section'),
  12. readMore = document.querySelectorAll('.section-toggle'),
  13. i = 0;
  14.  
  15. // Set up link for SVN repo.
  16. a.setAttribute('href','https://plugins.svn.wordpress.org/' + wporgLocaleBanner.currentPlugin);
  17. a.innerHTML = 'SVN repository';
  18.  
  19. // Add link to "Interested in Development?" section.
  20. document.querySelector('.plugin-development').appendChild( a );
  21.  
  22. // Show all hidden content.
  23. for( i; i < sections.length;i++ ) {
  24. sections[i].classList.remove('read-more');
  25. }
  26.  
  27. // Remove all "Read More" links.
  28. i = 0;
  29. for( i; i < readMore.length;i++ ) {
  30. readMore[i].style.display = 'none';
  31. }