2

By expecting the html page's code I found that a given link calls updateAuthors('next'). Can I call it with pentadacyl?

There's execute and javascript (commands?) but inserting the above call after them and hittin return doesn't work.

4
  • Using the :javascript command should work if the function is global, however when you click a link there is additional context that is sent to the method that it may be expecting. Do you see any errors in the messages window when you run :javascript updateAuthors('next')?
    – heavyd
    Mar 19, 2015 at 22:03
  • @heavyd: I do: ReferenceError: updateAuthors is not defined. But calling it in Firebug console works. I just don't want to open firebug. I think it might be possible in pentadactyl.
    – Adobe
    Mar 19, 2015 at 22:16
  • Perhaps, try window.updateAuthors('next')? From reading the docs, it sounds like it should work. Can you access other elements on the page? window.location or windows.document fore example?
    – heavyd
    Mar 19, 2015 at 22:21
  • @heavyd: it gives TypeError: window.updateAuthors is not a function.
    – Adobe
    Mar 19, 2015 at 22:26

2 Answers 2

1

Using the trick shown in this Stack Overflow answer you should be able to use this command:

:open javascript:updateAuthors('next')
3
:js content.wrappedJSObject.updateAuthors('next')

as described here.

The Error Console and Web Console execute code in the page context. We don't.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .