reset button, v4.1
This commit is contained in:
		
							parent
							
								
									4e16628ee8
								
							
						
					
					
						commit
						99c09fc640
					
				|  | @ -3,8 +3,8 @@ | |||
| 
 | ||||
| 	"manifest_version": 2, | ||||
| 	"name": "InteractiveFics", | ||||
| 	"version": "4.0", | ||||
| 	"description": "Replaces Y/N in Reader Insert/second person fics with a name of your choice.", | ||||
| 	"version": "4.1", | ||||
| 	"description": "Replaces Y/N & other variables in Reader Insert/second person fics with words of your choice.", | ||||
| 	"browser_action": { | ||||
| 	"default_icon": "icon.png", | ||||
| 	"default_popup": "popup.html" }, | ||||
|  |  | |||
							
								
								
									
										13
									
								
								popup.html
								
								
								
								
							
							
						
						
									
										13
									
								
								popup.html
								
								
								
								
							|  | @ -34,13 +34,9 @@ label *{ | |||
| .otherWords .change{ | ||||
| 	margin-right:0; | ||||
| } | ||||
| 
 | ||||
| button{ | ||||
| 	border:none; | ||||
| 	text-transform: uppercase; | ||||
| 	font-size:0.8em; | ||||
| 	background-color: #16a085; | ||||
| 	color:white; | ||||
| #clear-name{ | ||||
| 	margin-top:0.5em; | ||||
| 	width:87%; | ||||
| } | ||||
| 
 | ||||
| </style> | ||||
|  | @ -51,7 +47,8 @@ button{ | |||
| </head> | ||||
| <body> | ||||
| <h1>Enter the name here:</h1> | ||||
| <form><input type="text" id="inputTxt" placeholder="To restore, enter 'Y/N'"/><input type="submit" id="submit" value="Change"/></form> | ||||
| <form><input type="text" id="inputTxt"/><input type="submit" id="submit" value="Change"/></form> | ||||
| <button id="clear-name">Clear Name</button>  | ||||
| <p><details><summary>Is the author not using Y/N?</summary> | ||||
| 	<p>Enter the expression the author's using instead:</p> | ||||
| 	<p><small>(Make sure you already entered a name above. This change will go away if you refresh, so you'll have to enter it again)</small></p> | ||||
|  |  | |||
							
								
								
									
										3
									
								
								popup.js
								
								
								
								
							
							
						
						
									
										3
									
								
								popup.js
								
								
								
								
							|  | @ -1,11 +1,14 @@ | |||
| 
 | ||||
| document.addEventListener('DOMContentLoaded', function () { | ||||
|   document.getElementById('submit').addEventListener('click', clickHandler); | ||||
|   document.getElementById('clear-name').addEventListener('click', function(){ chrome.storage.local.remove("person", chrome.tabs.reload()) } ); | ||||
|   var others = document.getElementsByClassName('changeForm'); | ||||
|   for(var i=0; i<others.length; i++) | ||||
|   	others[i].addEventListener('submit', otherHandler); | ||||
| }); //instead of onclick="clickHandler()" in popup.html
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| function otherHandler(){ | ||||
| 	var myInput = this.replaceWord.value; | ||||
| 	if(myInput){ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Mariam Maarouf
						Mariam Maarouf