GithubHelp home page GithubHelp logo

traxsw / copy-url-for-alfred Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fallroot/copy-url-for-alfred

0.0 0.0 0.0 269 KB

You can copy browser's URL and title with various formats like markdown, anchor tag and your own.

License: MIT License

JavaScript 100.00%

copy-url-for-alfred's Introduction

Copy URL for Alfred

You can copy browser's URL and title with various formats like markdown, anchor tag and your own.

screenshot

Installation

Powerpack is required.

  1. Download copyurl-catalina.alfredworkflow on macOS Catalina. Download copyurl.alfredworkflow for others.
  2. Open file by double-clicking or dragging into Alfred.
  3. Open Alfred and type url.
  4. Select URL format.

You can change everything at Alfred Preferences > Workflows menu.

For macOS Catalina(10.15.x) Users

Some codes does not work in macOS Catalina. So you should write your favorite browser manually.

  • Open Alfred Preferences and choose Workflows > Copy URL
  • Select first script filter object
  • Edit myBrowsers array with exact browser name in order

Add your own template

  1. Open ~/Library/Application Support/Alfred 2/Workflow Data/com.fallroot.copyurl/config.json file.
  2. Edit contents with valid JSON format.

config.json format

config.json file should be array of object is consist of format and type fields. format field should be string of combination ${url}, ${title} or JavaScript function string like below.

[
    {
        "format": "${url}",
        "title": "URL"
    },
    {
        "format": "${title}",
        "title": "Title"
    },
    {
        "format": "<a href=\"${url}\">${title}</a>",
        "title": "Anchor"
    },
    {
        "format": "[${title}](${url})",
        "title": "Markdown"
    },
    {
        "format": "function({title,url}){return title.toUpperString() + '\\n' + url}",
        "title": "Custom"
    }
]

Supported Browsers

โš ๏ธ This workflow was made by using OSA(Open Scripting Architecture). You can't use this workflow in browsers which does not support OSA like Firefox.

Chromium

WebKit

License

MIT

Icon

Icons made by DinosoftLabs from www.flaticon.com

copy-url-for-alfred's People

Contributors

fallroot avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.