Salesforce Workbench SOQL Query Maximiser

Increases the space available to perform queries with when the screen is wider than 1000px

2024-04-09 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Salesforce Workbench SOQL Query Maximiser
// @namespace    http://tampermonkey.net/
// @version      2024-04-08
// @description  Increases the space available to perform queries with when the screen is wider than 1000px
// @author       Wilsoff
// @match        https://workbench.developerforce.com/query.php
// @icon         https://www.google.com/s2/favicons?sz=64&domain=developerforce.com
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    
    'use strict';

    if (window.innerWidth >= 1000) {

        //Make whole page 100% width
        var main = document.getElementById('mainBlock');
        main.style.setProperty('width', '100%', 'important');

        //Make the field selector bigger
        var elem = document.getElementsByName('QB_field_sel[]');
        elem[0].size = 30;
        elem[0].style.width = '32em';

        //Make the elements on the right align to the left
        var options1 = document.querySelector("#query_form > table > tbody > tr:nth-child(1) > td:nth-child(2) > table:nth-child(1) > tbody > tr");
        options1.style.setProperty('display', 'flex', 'important');

        var options2 = document.getElementById('QB_right_sub_table');
        options2.style.setProperty('display', 'flex', 'important');

        //Add spacing to make it look more like the original:
        var tableDatas = document.getElementsByTagName('td');
        var i = 0;

        for(i=0;i<tableDatas.length;i++){
            if(tableDatas[i].innerHTML.startsWith("Deleted and archived records")) {
                tableDatas[i].style.setProperty('margin-left', '50px', 'important');
                break;
            }
        }

        for(i=0;i<tableDatas.length;i++){
            if(tableDatas[i].innerHTML.startsWith("<br>Max Records")) {
                tableDatas[i].style.setProperty('padding-left', '50px', 'important');
                break;
            }
        }

        document.getElementById('QB_limit_txt').style.setProperty('margin-left', '50px', 'important');

    }

})();