]> src.twobees.de Git - tampermonkeyscripts.git/commitdiff
0.4: - improve position of search box
authorTobias Sachs <git-pngdhxpf-ts@twobees.de>
Fri, 18 Dec 2020 07:38:44 +0000 (08:38 +0100)
committerTobias Sachs <git-pngdhxpf-ts@twobees.de>
Fri, 18 Dec 2020 07:38:44 +0000 (08:38 +0100)
AzureDevOpsChangesetCommentSearch.js

index d0188013b8928a3b801944b29781da2b5cb523dc..c1e89af6eb2f91a953cfaa1e28b5c865c233e9f7 100644 (file)
@@ -1,6 +1,6 @@
 // ==UserScript==
 // @name         ADS changeset comment search
-// @version      0.3
+// @version      0.4
 // @description  Places a searchbox somewhere to search commit messages
 // @author       Tobias Sachs
 // @match        https://ads/*
@@ -9,6 +9,7 @@
 // @downloadURL  https://src.twobees.de/?p=tampermonkeyscripts.git;a=blob_plain;f=AzureDevOpsChangesetCommentSearch.js;hb=HEAD
 // ==/UserScript==
 
+// 0.4: - improve position of search box
 // 0.3: - fix abort search
 //      - filter reuslts by committers name
 //      - no need for an observer
     let searchTerm = "";
 
     GM_addStyle(`#ts_cs_search {
-                     display: block;
-                     background: white;
-                     position: absolute;
-                     left: 450px;
-                     top: 0px;
-                     height: auto;
-                     z-index: 9999;
+                    position: absolute;
+                    left: 50%;
+                    top: 0px;
+                    height: auto;
+                    z-index: 9999;
+                    transform: translateX(-50%);
                  }`);
     GM_addStyle(`.ts_match {
                      background: orange;
@@ -190,7 +190,7 @@ let addSearch = () => {
 
     console.debug("adding searchbox");
     let html = `<div id="ts_cs_search">
-                        <input id="ts_searchBox" width="120" placeholder="searchstring [von:Name]" />
+                        <input id="ts_searchBox" placeholder="searchstring [von:Name]" />
                         <span id="ts_searchStats"></span>
                         <div id="ts_searchResults"></div>
                     </div>`;