GitLab Tweaks

change the list order in GitLab Issue Boards

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         GitLab Tweaks
// @namespace    http://tampermonkey.net/
// @version      0.8
// @description  change the list order in GitLab Issue Boards
// @author       Longbiao CHEN
// @match        gitlab.longbiaochen.com/*
// @grant        GM_addStyle
// @license      GPLv3
// @require      https://code.jquery.com/jquery-3.2.1.min.js
// ==/UserScript==


(function() {

    // open Finder for files
    $('.detail-page-header-actions.js-issuable-actions').append('<a id="open-folder" class="d-none d-sm-none d-md-block btn btn-grouped btn-primary btn-inverted js-btn-issue-action" title="Open folder" data-qa-selector="open_folder_button" rel="nofollow" data-method="" href="open-folder:///Users/longbiao/Documents/">Open folder</a>');
    $('#open-folder').attr('href', 'open-folder:///Users/longbiao/Documents/' + window.location.pathname.split('/')[2]);
    document.addEventListener('keydown', function(e) {
        if (e.keyCode == 70 && e.shiftKey && e.metaKey) {
            console.log('hello');
            $('#open-folder').trigger( "click" );
        }
    }, false);

    // issue board
    var p = $('div.project-title > h2 > a');
    for(var i = 0; i < p.length; i++){
        var pi = p[i];
        pi.href += '/-/boards?key=1';
    }

    var p = $('div.namespace-title > a');
    for(var i = 0; i < p.length; i++){
        var pi = p[i];
        pi.href += '/-/boards?key=2';
    }


    var p = $('div.d-flex.align-items-center.flex-wrap.title.namespace-title.append-right-8 > a');
    for(var i = 0; i < p.length; i++){
        var pi = p[i];
        console.log(pi.href);
        pi.href += '/-/boards?key=3';

    }

    var p = $('.shortcuts-issues');
    for(var i = 0; i < p.length; i++){
        var pi = p[i];
        pi.href = pi.href.replace('/issues', '/boards');
    }
    $('#content-body > aside > div > div > a > i.fa-angle-double-right').click();

    // navigation buttons
    $('#nav-groups-dropdown > button').click(function(e){
        window.location.href = "/dashboard/groups?sort=name_asc";
    });

    $('a#logo').attr('href', '/dashboard/projects/starred?sort=name_asc');

    // wiki page
    $('body > div.layout-page.page-gutter.page-with-contextual-sidebar.right-sidebar-expanded.wiki-sidebar').attr('class','layout-page page-gutter page-with-contextual-sidebar right-sidebar-collapsed wiki-sidebar');
    $('aside.wiki-sidebar').attr('class', 'right-sidebar right-sidebar-collapsed wiki-sidebar js-wiki-sidebar js-right-sidebar');

    $('#filtered-search-issues').focus();

    $(document).on('dblclick', '.timeline-entry-inner', function(e){
        $('.qa-note-edit-button', this).click();
    });

})();