Reputation: 35
I have a problem with eval imacro function.
iMacros for FF v9.0.3 Firefox 50.1.0 Windows 10
TAG POS=1 TYPE=BUTTON ATTR=CLASS:content&&TXT:* EXTRACT = HTM
SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s.split(' ')[1];")
This script extract second word from HTM. But I need to replace = with :
I found that is a {{!EXTRACT}}'.replace('=',':')
but I dont know how to merge this in one like this
SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s.split(' ')[1];\"{{!EXTRACT}}\"; s.replace('=',':');")
When I put script like this I get full text from HTM with changed = in :. And I need only second word from HTM with changed = in : Can someone help me with this
Upvotes: 2
Views: 844
Reputation: 5299
You just missed a small thing:
TAG POS=1 TYPE=BUTTON ATTR=CLASS:content&&TXT:* EXTRACT=HTM
SET !VAR1 EVAL("var s = \"{{!EXTRACT}}\"; s = s.split(' ')[1]; s.replace('=', ':');")
Upvotes: 1