Coder Social home page Coder Social logo

Comments (9)

ssborbis avatar ssborbis commented on June 30, 2024 1

That might be best done with a Script-type vs an Engine-type. You're only grabbing the icon from the current page, correct? Thus, the {url} param?

New Script

window.open(location.origin + "/favicon.ico", '_blank');

you could actually fancy that up and trigger a download directly I think

from contextsearch-web-ext.

7peanuts avatar 7peanuts commented on June 30, 2024 1

Add a new entry to the search engines manager, a NEW SCRIPT not a new engine

Oh, I know why, script engine doesn't affect on page element.

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 30, 2024

{url} is not modified, nor is any other template param besides %s or {searchTerms}

Is this for a search engine or an app launcher?

Can you walk me through your workflow as to why you'd need to modify the current tab's url? I'll see if there's a workaround.

from contextsearch-web-ext.

7peanuts avatar 7peanuts commented on June 30, 2024

Is this for a search engine or an app launcher?

I use it to get the favicon, like this ➡️ https://github.com/favicon.ico

Can you walk me through your workflow as to why you'd need to modify the current tab's url? I'll see if there's a workaround.

I tried {subdomain} or {domain} ➡️ {subdomain}/favicon.ico
but it got this result ➡️ chrome-extension://ddippghibegbgpjcaaijbacfhjjeafjh/github.com/favicon.ico

So I can only use this template ➡️
https://{subdomain}/favicon.ico or http://{subdomain}/favicon.ico

However, I found that using google's icon service doesn't have strict requirements on URL, so this {url} can be used directly.
https://www.google.com/s2/favicons?domain={url} ➡️
https://www.google.com/s2/favicons?domain=https://github.com/ssborbis/ContextSearch-web-ext/issues/629

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 30, 2024

So this is for an app launcher? I'm still not 100% sure what you're doing. Downloading the favicon?

from contextsearch-web-ext.

7peanuts avatar 7peanuts commented on June 30, 2024

So this is for an app launcher? I'm still not 100% sure what you're doing. Downloading the favicon?

just for search, so i can download the favicon directly.

from contextsearch-web-ext.

7peanuts avatar 7peanuts commented on June 30, 2024

New Script

window.open(location.origin + "/favicon.ico", '_blank');

you could actually fancy that up and trigger a download directly I think

This script will open a new tab, how to open favicon page only.
20230325110751

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 30, 2024

Add a new entry to the search engines manager, a NEW SCRIPT not a new engine

image

image

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 30, 2024

how to open favicon page only.

In place of the current website?

window.location = location.origin + "/favicon.ico";

from contextsearch-web-ext.

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.