Get Page Title, etc.

Get more actions or share your own!
Post Reply
philandy
Posts: 1
Joined: Sat Dec 11, 2010 2:51 am

Get Page Title, etc.

Post by philandy » Sat Dec 11, 2010 2:59 am

I have had need in the past to copy a page title (more easily than view source). I can also see a need to copy the H1/H1 link within the current page, such as within a blog. So, I'm primarily here to ask if these are possible to add. Second, thank you for making this.

User avatar
DaveG
Flagfox Developer
Posts: 723
Joined: Wed Oct 03, 2007 9:06 pm
Location: Philadelphia, USA

Re: Get Page Title, etc.

Post by DaveG » Sat Dec 11, 2010 3:29 am

The capability to do what you need is actually already available in the current development version of Flagfox 4.1.

A title placeholder was added to the syntax and is available in Flagfox 4.1 alpha 4. (it was first requested by another user here)

As to in content headers via <H1> tags, that's not the sort of thing I would usually consider adding. For starters, you can have more than one, and the placeholder needs to return a single value. I also don't see it being used that much in normal actions and the title is generally what you'd want in this instance. You can, however, use the improved JavaScript action handling in 4.1a4+ to hack something together. This action will copy the first <H1> text content to the clipboard if it exists:

javascript:{var h1s = document.getElementsByTagName("h1"); if (h1s[0]) copystring(h1s[0].textContent);}

Again, this won't work in the current stable Flagfox 4.0.x; this uses new features currently in development for Flagfox 4.1.

Post Reply