MozillaZine

Finding Italicized Words in Websites

User Help for Mozilla Firefox
RazzMaTazz007
 
Posts: 4
Joined: October 9th, 2012, 10:50 pm

Post Posted April 25th, 2017, 1:23 am

I'm not sure if this is the right section to ask but anyway is there perhaps an add-on that can find Italicized words or something similar? I'm making an epub of a translated novel and finding those Italicized words manually is pretty tiresome.

LIMPET235
Moderator

User avatar
 
Posts: 37435
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Post Posted April 25th, 2017, 1:34 am

Moving to Firefox Support...

Have you tried searching the Addons site?
> https://addons.mozilla.org/en-US/firefo ... &cat=1%2C0

Take note of any comments by the author/s, as they may stop support for it/them soon.
Ancient Amateur Astronomer
Win-7-HP/IntelĀ® DualCore-2.0GHz/500G HDD/4 Gig Ram/550Watt PSU/350WattUPS/Firefox-20.0-50.0/T-bird-2.0.0.24/SnagIt-v10.0.1/MWP-7.11.0.
RadioYachting. Conficker Test. (Always choose the "Custom" Install.)

dickvl

User avatar
 
Posts: 52179
Joined: July 18th, 2005, 3:25 am

Post Posted April 26th, 2017, 5:19 am

Maybe use the Web Console or a bookmarklet if you are only interested in Italicized words and not its context.
It shouldn't be too difficult to come up with some JavaScript to find such text.
You can add a class to found nodes and use a style sheet or set a background color.
Some code to play with:
Code: Select all
var e=document.querySelectorAll("div,p,span"),E,i,F=[];
for(i=0; E=e[i]; i++){
if(E.style.getPropertyValue("font-style") == "italic"){
E.style.setProperty("background-color","#fcf","important");
E.focus();
C = {"node":E.nodeName,"content":E.textContent};
F.push(C);
prompt(JSON.stringify(C), JSON.stringify(C));
}
}
prompt(JSON.stringify(F), JSON.stringify(F));

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 10 guests