Welcome to DU!
    The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards.
    Join the community:
    Create a free account
    Support DU (and get rid of ads!):
    Become a Star Member
    Latest Breaking News
Editorials & Other Articles
General Discussion
The DU Lounge
    All Forums
        Issue Forums
        Culture Forums
        Alliance Forums
        Region Forums
        Support Forums
        Help & Search
    
Photography
In reply to the discussion: How to post photos to DU (Rev. June 2020) [View all]SorellaLaBefana
(435 posts)51. Q&D HTML/JS (save as .htm on your computer) which pulls out URL from Flickr result, copies to sys clipboard
        
Had to make an image file to show the code, as even with [xmp] DU removes some tags (including [xmp] with the angle brackets).
Here is the code which survives, missing bits can be copied from the above image.
==================
Flickr Image Tag Extractor
body {
font-family: Arial, sans-serif;
margin: 50px;
}
textarea {
width: 400px;
height: 200px;
padding: 10px;
font-size: 14px;
display: block;
margin-bottom: 10px;
}
button {
padding: 10px 20px;
font-size: 14px;
display: block;
margin-bottom: 10px;
}
#result {
padding: 10px;
border: 1px solid #ccc;
width: 400px;
height: 100px;
overflow: auto;
}
Flickr Image Tag Extractor
Extract Image Tag
Copy Result
Reload
function extractImageTags() {
const input = document.getElementById('input').value;
const regex = /[img](.*?)[/img]/g;
const matches = input.match(regex);
let result = '';
if (matches) {
result = matches.map(match => match.replace(/[img]|[/img]/g, '')).join('n');
}
document.getElementById('result').textContent = result;
}
function copyToClipboard() {
const result = document.getElementById('result').textContent;
navigator.clipboard.writeText(result)
.then(() => alert('Result copied to clipboard!'))
.catch(err => alert('Failed to copy result: ' + err));
}
Edit history
Please sign in to view edit histories.
  Recommendations
0 members have recommended this reply (displayed in chronological order):
						
							56 replies
							
								 = new reply since forum marked as read
							
						
      
      
					
						Highlight:
						NoneDon't highlight anything
						5 newestHighlight 5 most recent replies
						RecommendedHighlight replies with 5 or more recommendations
 = new reply since forum marked as read
							
						
      
      
					
						Highlight:
						NoneDon't highlight anything
						5 newestHighlight 5 most recent replies
						RecommendedHighlight replies with 5 or more recommendations
					
                    
					
                     = new reply since forum marked as read
							
						
      
      
					
						Highlight:
						NoneDon't highlight anything
						5 newestHighlight 5 most recent replies
						RecommendedHighlight replies with 5 or more recommendations
 = new reply since forum marked as read
							
						
      
      
					
						Highlight:
						NoneDon't highlight anything
						5 newestHighlight 5 most recent replies
						RecommendedHighlight replies with 5 or more recommendations
					
                    
					
        
        Thanks a lot.  I have added your instructions as a link on  my desktop for handy reference.
        Glorfindel
        Aug 2017
        #2
      
        
        and I'm sorry this is just gobblygook to me, I am worthless at all this tech stuff.  Sorry.
        a kennedy
        Sep 2020
        #27
      
        
        apples and oranges.... there is no such thing as 'message box' and I tried to explain that
        CurtEastPoint
        Oct 2022
        #44
      
        
        I just made an image of your response, uploaded it and pasted the 'direct link' below
        CurtEastPoint
        May 2019
        #12
      
        
        If you right click on FB photos on Chrome you do not get a url that will show up here.  I just
        Maraya1969
        Aug 2020
        #22
      
        
        Facebook is an exception.  You have to save photo and upload it and get its own new URL.  Sorry
        CurtEastPoint
        Aug 2020
        #23
      
        
        I have been trying to post my photo all morning......I have Safari as my browser......
        a kennedy
        Sep 2020
        #24
      
        
        clueless about mac/apple/safari. Maybe one of our Apple people might help? Sorry.
        CurtEastPoint
        Sep 2020
        #25
      
        
        Nope. Notice nothing happens on that photo when you right click.  It's embedded in HTML.
        CurtEastPoint
        Jan 2021
        #30
      
        
        Q&D HTML/JS (save as .htm on your computer) which pulls out URL from Flickr result, copies to sys clipboard
        SorellaLaBefana
        May 2024
        #51
      
        
        Hopefully I will post some of my pictures after I carefully read how to do it..I am a picture taker
        Stuart G
        Dec 2021
        #33
      
        
        Please do and if you have issues, let me know or post in the photog forum.
        CurtEastPoint
        Dec 2021
        #34
      
  