{"id":13447896,"url":"https://github.com/chengyin/WhatFont-Bookmarklet","last_synced_at":"2025-03-22T01:31:35.672Z","repository":{"id":1378977,"uuid":"1332610","full_name":"chengyin/WhatFont-Bookmarklet","owner":"chengyin","description":"The core of WhatFont Tool","archived":false,"fork":false,"pushed_at":"2017-05-27T21:17:13.000Z","size":71,"stargazers_count":489,"open_issues_count":18,"forks_count":75,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-10-28T13:11:30.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://chengyinliu.com/whatfont.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"ncsa","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chengyin.png","metadata":{"files":{"readme":"README.mkd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-02-05T21:14:49.000Z","updated_at":"2024-10-12T17:55:58.000Z","dependencies_parsed_at":"2022-08-16T13:15:11.788Z","dependency_job_id":null,"html_url":"https://github.com/chengyin/WhatFont-Bookmarklet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengyin%2FWhatFont-Bookmarklet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengyin%2FWhatFont-Bookmarklet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengyin%2FWhatFont-Bookmarklet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengyin%2FWhatFont-Bookmarklet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chengyin","download_url":"https://codeload.github.com/chengyin/WhatFont-Bookmarklet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244893464,"owners_count":20527598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T05:01:29.742Z","updated_at":"2025-03-22T01:31:35.365Z","avatar_url":"https://github.com/chengyin.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"WhatFont\n========\n\nWhatFont is a JavaScript script to detect what font in the stack is being used on any elements of a web page.\n\nHere in the repo is the core component with out wrappers, the wrapped Chrome/Safari extensions are available at [`http://chengyinliu.com/whatfont.html`](http://chengyinliu.com/whatfont.html).\n\nHow to Use\n----------\n\n`whatfont_core.js` is the core script. It adds `_whatFont()` into the global scope. WhatFont then runs in a closure created by the `_whatFont()` function.\n\nAn controller object is returned by `whatFont()` function. The controller will be used to set up the dependencies (jQuery and stylesheet) and initialize WhatFont.\n\nThis controller has the following functions:\n\n* `setJQuery(jQ)`\n\n\tWhatFont requires jQuery (v1.5.2), if jQuery has already been loaded into the global scope, the script finds it automatically. Otherwise `setJQuery(jQ)` needs to be called to set up jQuery object.\n\n* `setCSSURL(url)`\n\n\tWhatFont injects its stylesheet file into the webpage. The script comes with a default URL setting, if you want to change the setting, calling this function.\n\n* `getVer()`\n\n\tReturn the version of WhatFont.\n\n* `init()`\n\n\tInitialize WhatFont and inject to the current `document`.\n\n* `restore()`\n\n\tRemove WhatFont from current `document`.\n\n\nExample\n-------                     \n\twf = _whatFont();\t\t\n\twf.setjQuery(jQuery);\t\t// Setup jQuery\n\twf.init();\t\t\t\t\t// Load WhatFont\n\twf.restore();\t\t\t\t// Remove WhatFont\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchengyin%2FWhatFont-Bookmarklet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchengyin%2FWhatFont-Bookmarklet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchengyin%2FWhatFont-Bookmarklet/lists"}