omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    1Password / Javascript Bookmarklet / URL Scheme / Workflow Help...

    Editorial
    2
    3
    55266
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • calebaharrison208
      calebaharrison208 last edited by

      Hey Folks,

      I'm having a hard time figuring out my workflow, here. My goal is this:

      • Visit any webpage (specifically those with 'www.' subdomain)
      • Hit javascript bookmarklet
      • Bookmarklet sends domain name to Editorial, which strips 'www.' from domain
        • Some of my 1p website fields do not have the 'www.' in them, and won't be found (i.e. 'www.google.com' does not pull up 'google.com')
      • Editorial sends stripped text to 1p as search.

      Here's what I have so far.

      ###Bookmarklet

      javascript:window.location='editorial://?command=1pSearch&input='+window.location.hostname

      The command runs, but it just runs the command on an empty input, it seems. That is, 1p launches with a blank search.

      ###1pSearch Workflow

      Here's the link to my workflow.

      Any help is appreciated!

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by

        I think it would probably be easier to strip the www. within the JavaScript of the bookmarklet, you don't really need Editorial for that.

        1 Reply Last reply Reply Quote 0
        • calebaharrison208
          calebaharrison208 last edited by

          Ah, took me some time to figure out how to script that with JS, but you're right, it works better that way. If anybody is interested, here's my bookmarklet:

          javascript:text=window.location.hostname;if(/www\./.test(text)){text=text.replace(/www\./,"");window.location='onepassword://search/'+text;}else{window.location='onepassword://search/'+text;}
          

          Thanks for the quick response, Ole!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors