Greasy Fork

Shined up real nice.

Tilda Publishing Helper: Recid of Blocks, Additionnal Buttons

try to take over the world!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// ==UserScript==
// @name         Tilda Publishing Helper: Recid of Blocks, Additionnal Buttons
// @namespace    https://roman-kosov.ru
// @version      0.3
// @description  try to take over the world!
// @author       Roman Kosov
// @copyright    2018, Roman Kosov (https://greasyfork.org/users/167647, https://openuserjs.org/users/roman-kosov)
// @match        https://tilda.cc/page/?*
// @match        https://tilda.cc/projects/settings/?*
// @license      MIT
// ==/UserScript==
(function () {
  'use strict';
  $('div.record').each(function (index) {
    var recordid = $(this).attr("recordid");
    var recid = "#rec" + recordid;
    $(this).children("div#mainleft").children("div")
      .append("<div class=\"tp-record-edit-icons-left__one-right-space\"></div>" +
        "<div class=\"tp-record-edit-icons-left__one\">" +
        "<div class=\"tp-record-edit-icons-left__item-title\"><span class=\"tp-record-edit-icons-left__item-tplcod\">" +
        recid +
        "</span></div>" +
        "</div>");
    $("#record" + recordid + " > div:nth-child(1):not(.mainright)").appendTo($(this)
      .children("div#mainleft").children("div")).removeClass().css("padding", "7px 15px");
  });

    var projectid = $("[name='projectid']").val();

    $("a.js-metrika-connect-state").each(function() {
        if(this.text.includes("Перейти в раздел")) {
            $( "<br><br>" ).appendTo(this.parentNode);
            $("<a>", {
                'class': "ss-btn",
                'href': "https://tilda.cc/projects/redirects/?projectid=" + projectid,
                html: 'Редирект страниц'
            }).appendTo(this.parentNode);
            $( "<span>", {
                html: '&emsp;'
            } ).appendTo(this.parentNode);

            $("<a>", {
                'class': "ss-btn",
                'href': "https://tilda.cc/projects/favicons/?projectid=" + projectid,
                html: 'Редактирование иконок'
            }).appendTo(this.parentNode);
            $( "<span>", {
                html: '&emsp;'
            } ).appendTo(this.parentNode);

            $("<a>", {
                'class': "ss-btn",
                'href': "https://tilda.cc/projects/https/?projectid=" + projectid,
                html: 'Настройка HTTPS'
            }).appendTo(this.parentNode);
            $( "<span>", {
                html: '&emsp;'
            } ).appendTo(this.parentNode);
        }
    });
})();