Greasy Fork is available in English.

GreasyFork script icon

On a script info page it shows its icon from the script meta block

< Feedback on GreasyFork script icon

Câu hỏi/Bình luận

woxxomTác giả
§
Posted: 08-12-2014
Edited: 12-12-2014

TO DO list. Feedback needed!

  • Icon refresh interval

Currently the icon url is parsed only once and then stored to GM script db

§
Posted: 08-12-2014
Edited: 08-12-2014

Good Idea!
Work fine (just a Firefox Hang at the install....)
Here a CSS to:
- Move the generated icon near the script Name on script info page (here by example)
- Enlarge the icon (always the same size for all)
- Backround-Color for the icon container, to deal with my Dark Gray userstyles
- Backround for the icon iteself, for the same reason :


/* For GM - GreasyFork script icon (https)
https://greasyfork.org/fr/scripts/6861-greasyfork-script-icon-https 
=== */
#script-info>header>h2>div {
   position: absolute;
    display: inline-block;
    height: 64px!important;
    height: 159px!important;
    width: 64px!important;
    left: -70px!important;
    top: 0!important;
    padding: 3px!important;
    text-align: right;
    background-color: black !important;
}
#script-info>header>h2>div img {
    height: auto;
    width: 64px!important;
    padding: 2px!important;
/* background-color: yellow!important; */
    background: none repeat scroll 0 0 rgba(191, 191, 190, 0.33) !important;
    border-radius: 5px !important;
    box-shadow: 0 0 2px #cccccc inset !important;
}
 

Test link
- Gray Icon without Background (invisible on Dark them) :
Your script page , GreasyFork script icon (https)

- Original Small icon :
[TS] Citrus GFork
ps: this CSS work for this script too

woxxomTác giả
§
Posted: 08-12-2014
Edited: 08-12-2014

Ah, indeed icon positioning was wrong for the default greasyfork layout, thanks. I've updated the script.

However stretching the icon doesn't seem like a universally good idea to me, maybe I'll make this an option.

§
Posted: 10-12-2014
Edited: 10-12-2014

Possible for http too?

By example for this script:
Scroll with Mouse Plus

Its icon use http:
// @icon http://lkytal.qiniudn.com/ic.ico

woxxomTác giả
§
Posted: 11-12-2014

The point of https restriction is to keep the page secure. Otherwise an antivirus software may dumbly block the entire GF site from opening in a user's browser just because of some icon which is hosted on a reported site, and some of the popular hosting sites are already marked as harmful by that stupid antivirus software - those were http sites as far as I know.

§
Posted: 11-12-2014

Or we can fetch favicon via GM_xmlhttpRequest and store to localStorage/GM Storage. Disadvantage would be that the database size can increase exponentially.

woxxomTác giả
§
Posted: 11-12-2014
Edited: 12-12-2014

Thanks for clarification, Jason - I forgot about that exploit.

@JixunMoe, this idea is interesting as it eliminates the mixed content issue but that won't prevent a dumb antivirus from displaying an alert when it intercepts the GM_xmlhttpRequest url? The latter can only be fixed if the icon support is implemented by GF server.

P.S. Updated the script with HTTP icon support as per suggestion (hopefully this is more secure than direct-linking).
As for db-size, I'll add some maintenance later, currently only http icons are stored.

§
Posted: 12-12-2014

Thanks for clarification, Jason - I forgot about that exploit.

@JixunMoe, this idea is interesting as it eliminates the mixed content issue but that won't prevent a dumb antivirus from displaying an alert when it intercepts the GM_xmlhttpRequest url? The latter can only be fixed if the icon support is implemented by GF server.

P.S. Updated the script with HTTP icon support as per suggestion (hopefully this is more secure than direct-linking).
As for db-size, I'll add some maintenance later, currently only http icons are stored.

Fetch via api will just break the image but not give a whole page warning I think..? Maybe I was wrong :<

Post reply

Đăng nhập để bình luận