FSD ID Generator

Sets id values for the "Job Description" and "Side Panel" divs in FSD.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

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

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         FSD ID Generator
// @namespace    https://almedawaterwell.com/
// @version      1.3
// @description  Sets id values for the "Job Description" and "Side Panel" divs in FSD.
// @author       Luke Pyburn
// @include      https://reveal.us.fleetmatics.com/fsd/*
// @include      https://reveal.fleetmatics.com/fsd/*
// @run-at       document-idle
// @grant        GM_getValue
// @grant        unsafeWindow
// @require      http://code.jquery.com/jquery-3.4.1.min.js
// ==/UserScript==

var $ = window.jQuery;
document.addEventListener('mouseup', function() {
    $('[class="fsd-sd-text-area__input ng-pristine ng-valid ng-touched"').each(function(i, ele) {
            var id = "description";
            $(this).attr('id', id);
        });
    $('[class="fsd-sd-text-area__input ng-untouched ng-pristine ng-valid"').each(function(i, ele) {
        var id = "description";
           $(this).attr('id', id);
        });
});

window.addEventListener('blur', function idReset() {
         $('[class="fsd-sd-text-area__input ng-pristine ng-valid ng-touched"').each(function(i, ele) {
            var id = "description";
            $(this).attr('id', id);
        });
        $('[class="fsd-sd-text-area__input ng-untouched ng-pristine ng-valid"').each(function(i, ele) {
        var id = "description";
           $(this).attr('id', id);
        });
}
);
window.addEventListener('click', function saveButtonId() {
         $('[class="btn btn-primary btn-md"').each(function(i, ele) {
            var id = "saveButton";
            $(this).attr('id', id);
        });
}
);
window.addEventListener('mouseup', function() {
    $('[class="fsd-side-panel-body__content"').each(function(i, ele) {
            var id = "side-panel";
            $(this).attr('id', id);
        });
});
window.addEventListener('blur', function setNavbarId() {
    $('[class="fsd-host-root__navbar"').each(function(i, ele) {
            var id = "navbar";
            $(this).attr('id', id);
        console.log("Navbar ID set.");
        });
});