GithubHelp home page GithubHelp logo

Comments (4)

hzlzh avatar hzlzh commented on July 28, 2024

A API is needed if you want to use this service with workflow.

from alfred-workflows.

ryanthara avatar ryanthara commented on July 28, 2024

I'll ask the author for an api, but he hasn't answered yet.

0cn.de has the ability to save the service as bookmarks, and you will see the code behind.

javascript:(function()%7Bvar%20d=false;%20var%20n_u=navigator.userAgent;%20if(location.protocol=='https:'%20&&%20(n_u.indexOf('Chrome')!=-1%20%7C%7C%20n_u.indexOf('Opera')!=-1))%7Bwindow.open('https://0cn.de/?url='+encodeURIComponent(document.URL)+'&noref=1',%20'_blank');%20d=true;%7D%20if(!d)%7Bvar%20d=document,s=d.createElement('script');s.charset='UTF-8';s.type='text/javascript';s.src='https://0cn.de/js/bookmark.php?s=0.2&noref=1&url='+encodeURIComponent(d.URL);d.body.appendChild(s);%7D%7D)();

Is this helpful?

from alfred-workflows.

hzlzh avatar hzlzh commented on July 28, 2024

Yes, this should be a kind of API:

https://0cn.de/js/bookmark.php?s=0.2&noref=1&url=google.com

and you can get the final short link this.

var nr='&noref=1';if (null==prompt("Hier die gewünschte Kurz-URL. Kopiere sie und klicke 'OK', wenn du zufrieden bist. Klicke auf 'Abbrechen', um weitere Einstellungen auf 0cn.de vorzunehmen (falls nichts passiert: Pop-Up zulassen).", "http://0cn.de/qfzu")){ window.open('https://0cn.de/?url='+encodeURIComponent(document.URL)+nr, '_blank'); }

from alfred-workflows.

ryanthara avatar ryanthara commented on July 28, 2024

Looks good. But my skills are so bad, I failed with an implementation. :-(

from alfred-workflows.

Related Issues (20)

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.