Gfycator 500+

Dodatkowy przycisk ułatwiający szybką konwersję gifów lub obrazków do postaci gfycatów

目前為 2016-08-21 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Gfycator 500+
  3. // @version 1.0
  4. // @description Dodatkowy przycisk ułatwiający szybką konwersję gifów lub obrazków do postaci gfycatów
  5. // @author tRNA
  6. // @license GNU AGPLv3
  7. // @match http://*.wykop.pl/*
  8. // @namespace https://gf.qytechs.cn/pl/users/56863
  9. // @grant none
  10. // ==/UserScript==
  11. $(document).ready(function() {
  12. function Main() {
  13. $("#ButtonGfycat").remove();
  14. $(".nospace").find(".selectUrl").find("p").find("a").after('<button id="ButtonGfycat" type="button" class="button" tabindex="2"><i id="loading" class="fa fa-spinner fa-spin" style="display: none"></i>Gfycatuj</button>');
  15. document.getElementById('ButtonGfycat').onclick = function() {
  16. $("#loading").show();
  17. var SingleValues = $("input[name='url']").val();
  18. var StatusResponse;
  19. $.getJSON('http://upload.gfycat.com/transcode?fetchUrl=' + SingleValues, function(jd) {
  20. if (jd.error !== undefined) {
  21. StatusResponse = 'Błąd: ' + jd.error;
  22. } else {
  23. StatusResponse = 'https://gfycat.com/' + jd.gfyname;
  24. }
  25. $("input[name='url']").val(StatusResponse);
  26. $("#loading").hide();
  27. });
  28. };
  29. }
  30. function ClickEvent() {
  31. $("fieldset.row.buttons.dnone").on("click", "a.button.openAddMediaOverlay", function(e) {
  32. setTimeout(Main, 10);
  33. });
  34. }
  35. $("div.row.elements.actions").on("click", " a.affect.btnReply", function(e) {
  36. setTimeout(ClickEvent, 10);
  37. });
  38. $("fieldset.row.buttons.dnone").on("click", "a.button.openAddMediaOverlay", function(e) {
  39. setTimeout(Main, 10);
  40. });
  41. $(document).ajaxComplete(function() {
  42. $("div.row.elements.actions").on("click", " a.affect.btnReply", function(e) {
  43. setTimeout(ClickEvent, 10);
  44. });
  45. });
  46. });
  47.  

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址