This repository was archived by the owner on Nov 4, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -99,14 +99,20 @@ ol li {
9999 white-space : pre; /* CSS 2.0 */
100100 white-space : pre-wrap; /* CSS 2.1 */
101101 white-space : pre-line; /* CSS 3.0 */
102- white-space : -pre-wrap; /* Opera 4-6 */
103- white-space : -o-pre-wrap; /* Opera 7 */
104- white-space : -moz-pre-wrap; /* Mozilla */
105- word-wrap : break-word; /* IE 5+ */
102+ word-wrap : break-word;
106103}
107104
108105# delete-log {
109106 float : right;
110107 margin-right : 10px ;
111108 margin-top : 52px ;
112109}
110+
111+ # tick-icon {
112+ -webkit-transition : opacity 0.3s ease-in-out;
113+ transition : opacity 0.3s ease-in-out;
114+ }
115+
116+ .show { opacity : 1 ; }
117+
118+ .hide { opacity : 0 ; }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ <h5>Request capture</h5>
1919 </ label >
2020 < h5 > Filter requests</ h5 >
2121 < input type ="text " id ="filterRequest " placeholder ="filter by domain ">
22+ < img src ="assets/tick.png " id ="tick-icon " width ="20px " class ="hide " />
2223 < a href ="# " id ="delete-log " title ="clear logs "> < img src ="assets/delete.png " /> </ a >
2324 < div class ="logger-area ">
2425 < h5 > Last 10 requests</ h5 >
Original file line number Diff line number Diff line change 22var toggleSwitch = document . getElementById ( 'postManSwitch' ) ;
33var filterUrlInput = document . getElementById ( 'filterRequest' ) ;
44var deleteBtn = document . getElementById ( 'delete-log' ) ;
5+ var tickIcon = document . getElementById ( 'tick-icon' ) ;
56
67// this port is available as soon as popup is opened
78var popupPort = chrome . runtime . connect ( { name : 'POPUPCHANNEL' } ) ;
@@ -46,6 +47,15 @@ function showLogs(items, container) {
4647 }
4748}
4849
50+ function setTickIconVisibility ( ) {
51+ var domain = filterUrlInput . value ;
52+ if ( domain . length && domain != ".*" ) {
53+ tickIcon . className = "show" ;
54+ } else {
55+ tickIcon . className = "hide" ;
56+ }
57+ }
58+
4959function setOptions ( options ) {
5060 if ( options . isCaptureStateEnabled !== appOptions . toggleSwitchState ) {
5161 toggleSwitch . checked = appOptions . toggleSwitchState = options . isCaptureStateEnabled ;
@@ -62,7 +72,9 @@ toggleSwitch.addEventListener('click', function() {
6272} , false ) ;
6373
6474filterUrlInput . addEventListener ( 'input' , function ( ) {
75+ var domain = filterUrlInput . value ;
6576 appOptions . filterRequestUrl = filterUrlInput . value ;
77+ setTickIconVisibility ( ) ;
6678 popupPort . postMessage ( { options : appOptions } ) ;
6779} , false ) ;
6880
You can’t perform that action at this time.
0 commit comments