You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Clipper: Feature added for storing urls (#1173)
* Clipper: Feature added for storing urls * Clipper: Clip URL variable nameing changed
This commit is contained in:
		
				
					committed by
					
						 Laurent Cozic
						Laurent Cozic
					
				
			
			
				
	
			
			
			
						parent
						
							aa86fa9986
						
					
				
				
					commit
					34323042d5
				
			| @@ -249,6 +249,10 @@ | ||||
|  | ||||
| 			return {}; | ||||
|  | ||||
| 		} else if (command.name === "pageUrl") { | ||||
| 			let url = location.origin + location.pathname + location.search; | ||||
| 			return clippedContentResponse(pageTitle(), url, getImageSizes(document)); | ||||
|  | ||||
| 		} else { | ||||
| 			throw new Error('Unknown command: ' + JSON.stringify(command)); | ||||
| 		} | ||||
|   | ||||
| @@ -49,6 +49,12 @@ class AppComponent extends Component { | ||||
| 			}); | ||||
| 		} | ||||
|  | ||||
| 		this.clipUrl_click = () => { | ||||
| 			bridge().sendCommandToActiveTab({ | ||||
| 				name: 'pageUrl', | ||||
| 			}); | ||||
| 		} | ||||
|  | ||||
| 		this.clipScreenshot_click = async () => { | ||||
| 			try { | ||||
| 				const baseUrl = await bridge().clipperServerBaseUrl(); | ||||
| @@ -296,6 +302,7 @@ class AppComponent extends Component { | ||||
| 						<li><a className="Button" onClick={this.clipComplete_click}>Clip complete page</a></li> | ||||
| 						<li><a className="Button" onClick={this.clipSelection_click}>Clip selection</a></li> | ||||
| 						<li><a className="Button" onClick={this.clipScreenshot_click}>Clip screenshot</a></li> | ||||
| 						<li><a className="Button" onClick={this.clipUrl_click}>Clip URL</a></li> | ||||
| 					</ul> | ||||
| 				</div> | ||||
| 				{ foldersComp() } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user