vbcs

Edit UI https://my.jia.360.cn/web/myList

当前为 2019-11-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name vbcs
  3. // @namespace
  4. // @version 1.1
  5. // @description Edit UI https://my.jia.360.cn/web/myList
  6. // @author Paul Nguyen
  7. // @grant none
  8.  
  9. // @include /^https?://trading\.vcbs\.com\.vn/.*$/
  10.  
  11. // @namespace vbcs
  12. // ==/UserScript==
  13.  
  14. $(function() {
  15. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
  16. var stype = '<style>';
  17. stype += ' #SHB_TLChart { display: none; } ';
  18. stype += ' #priceBoardView > div > table > tbody > tr > td:nth-child(2) { display: none; } ';
  19. stype += ' div.headerMenu { display: none; } ';
  20. stype += ' div#accountBar { display: none; } ';
  21.  
  22. stype += ' div.headerTop { display: none; } ';
  23. stype += ' body, table, tr, td, div, input, select, .dxgvHSDC { background-color: rgb(48, 48, 47) !important; background: none; } ';
  24. stype += ' body, table, tr, td, div, input, span, select { color: #ccc !important; } ';
  25. stype += ' #Grid_Currenttock_DXMainTable td { color: #ccc !important; } ';
  26. stype += ' #NormalOrderGrid_DXMainTable td { color: #ccc !important; } ';
  27. stype += ' #OrderList_DXMainTable td { color: #ccc !important; } ';
  28. stype += ' #ConOrderList_DXMainTable td { color: #ccc !important; } ';
  29. stype += ' .tabOrderActive { border-bottom: 3px #505050 solid !important; } ';
  30. stype += ' #Grid_Currenttock_DXFooterTable { display: none; } ';
  31. stype += ' .choose_pages { border: #505050 thin solid !important; } ';
  32. stype += ' input[src="/OnlineTrading/Content/Images/refresh3.png"] { display: none; } ';
  33.  
  34. stype += ' #SplitterFooterSub > div:nth-child(1) > div.form_info > div { display: none; } ';
  35. stype += ' #tblOne > tbody > tr { display: none; } ';
  36. stype += ' #tblOne > tbody > tr:nth-child(7), #tblOne > tbody > tr:nth-child(8), #tblOne > tbody > tr:nth-child(9), #tblOne > tbody > tr:nth-child(4) { display: table-row !important; } ';
  37.  
  38. stype += ' #tblSymbolChart { height: unset !important; } ';
  39. stype += ' #priceBoardView > div > table > tbody > tr > td:nth-child(1) { width: unset !important; } ';
  40.  
  41. stype += ' #NormalOrderGrid_col4 { display: none; } '; // so luu ky
  42. stype += ' table#NormalOrderGrid_DXMainTable tr.dxgvDataRow_Metropolis > td:nth-child(5) { display: none; } ';
  43. stype += ' #NormalOrderGrid_col5 { display: none; } '; // Tieu Khoan
  44. stype += ' table#NormalOrderGrid_DXMainTable tr.dxgvDataRow_Metropolis > td:nth-child(6) { display: none; } ';
  45. stype += ' #NormalOrderGrid_col11 { display: none; } '; //Gia tri
  46. stype += ' table#NormalOrderGrid_DXMainTable tr.dxgvDataRow_Metropolis > td:nth-child(6) { display: none; } ';
  47.  
  48. stype += '<style>';
  49. $("body").prepend(stype);
  50.  
  51. waitForKeyElements ( "#divStockTrans", setFocusAddressInput );
  52.  
  53. });
  54.  
  55. function setFocusAddressInput (jNode) {
  56. //jNode.click();
  57. $("#priceBoardView > div > table > tbody > tr > td:nth-child(3) > #divStockTrans").appendTo("#priceBoardView > div > table > tbody > tr > td:nth-child(1)");
  58. }
  59.  
  60. // @require https://gist.github.com/raw/2625891/waitForKeyElements.js
  61. function waitForKeyElements ( selectorTxt, actionFunction, bWaitOnce, iframeSelector ) { var targetNodes, btargetsFound; if (typeof iframeSelector == "undefined") targetNodes = $(selectorTxt); else targetNodes = $(iframeSelector).contents () .find (selectorTxt); if (targetNodes && targetNodes.length > 0) { btargetsFound = true; targetNodes.each ( function () { var jThis = $(this); var alreadyFound = jThis.data ('alreadyFound') || false; if (!alreadyFound) { var cancelFound = actionFunction (jThis); if (cancelFound) btargetsFound = false; else jThis.data ('alreadyFound', true); } } ); } else { btargetsFound = false; } var controlObj = waitForKeyElements.controlObj || {}; var controlKey = selectorTxt.replace (/[^\w]/g, "_"); var timeControl = controlObj [controlKey]; if (btargetsFound && bWaitOnce && timeControl) { clearInterval (timeControl); delete controlObj [controlKey]; } else { if ( ! timeControl) { timeControl = setInterval ( function () { waitForKeyElements ( selectorTxt, actionFunction, bWaitOnce, iframeSelector ); }, 300 ); controlObj [controlKey] = timeControl; } } waitForKeyElements.controlObj = controlObj; }
  62.  
  63.