Comments (5)
Further inspection shows that Chrome 67.x requires "manifest_version": 2
to be present in manifest.json
, as explained in https://developer.chrome.com/extensions/manifestVersion.
You can unpack the CRX file using 7-Zip, modify manifest.json
as described above, and then go to Chrome's chrome://extensions/
, activate Developer Mode
, and Load Unpacked
.
from yslow.
Hi there,
First of thanks for helping in adding the missing manifest line.
On OSX however it results in an error about the "background_page": "background.html",
But with or without that in the manifest file the extensions will show up by loading the unpacked version.
However no functionality you are used of it seems to get triggered.
If you or anybody can comment if this;
A; Works on Windows (and other OSses)?
B; If there is something special we have to do to get it working on OSX.
That would be greatly appreciated.
Thanks in advance for anyone looking into this, while ySlow is a bit older it's a still a must use in my book.
from yslow.
The manifest.json
should become something like this:
{
"update_url":"http://clients2.google.com/service/update2/crx",
"manifest_version": 2,
"content_security_policy": "script-src 'self'; object-src 'self';",
"background": {
"page": "background.html",
"persistent": false
},
"name": "YSlow",
"version": "3.1.2",
"description": "Make your pages faster with Yahoo!'s page performance tool",
"icons": {
"128": "128.png",
"16": "16.png",
"32": "32.png",
"48": "48.png"
},
"browser_action": {
"name": "YSlow",
"default_icon": "icon.png"
},
"options_page": "options.html",
"content_scripts": [
{
"matches": [
"http://*/*",
"https://*/*"
],
"js": [
"content.js",
"yslow-chrome.js"
]
}
],
"permissions": [
"tabs",
"cookies",
"http://*/*",
"https://*/*"
]
}
However, the new version of Chrome prevents inline JavaScript from being loaded. It does not allow content_security_policy
to be set to less insecure values such as unsafe-inline
(See the above snippet. The only possible values are self
and sha*
. Neither allows inline scripting).
As YSlow code makes heavy use of inline scripts, the underlying code must be carefully modified in order for Chrome to allow it to run. Here's a simple snippet to show the problem (it's part of yslow-chrome.js
):
sHtml += '<div id="runtestDiv"><button id="runtest-btn" onclick="javascript:document.ysview.runTest()">Run Test</button></div></div><div class="footer"><div class="moreinfo">' + '<a href="javascript:document.ysview.openLink(\'https://yslow.org/\');"><b>»</b>' + more_info_text + '</a></div></div></div></div></div>';
Here, you can spot two instances of javascript:
inline scripts. Many more occur in various other places.
from yslow.
I have test to modify the plugin on chrome, it work well but i have to get rid of all the inline onclick .. but it work with direct input in the javascript console
it appear that the way the plugin grab the tab url is obsolete also :/
i will upload the custom yslow when i have the time to tweak it a little ;)
--
++
You have to delete all the inline js also in the options and backgroung file and put them respectively in a .js link to there old file
from yslow.
edit manifest and use this
{
"name": "YSlow",
"manifest_version": 2,
"version": "3.1.9",
"description": "YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages.",
"icons": {
"128": "128.png",
"16": "16.png",
"32": "32.png",
"48": "48.png"
},
"browser_action": {
"name": "YSlow",
"default_icon": {
"19": "48.png",
"38": "48.png"
}
},
"background_page": "background.html",
"options_page": "options.html",
"content_scripts": [{
"matches": [
"http://*/*",
"https://*/*"
],
"js": [
"content.js",
"yslow-chrome.js"
]
}],
"permissions": [
"tabs",
"cookies",
"http://*/*",
"https://*/*"
]
}
from yslow.
Related Issues (20)
- TypeError: undefined is not an object (evaluating 'args.length') yslow.js:5 in global code HOT 1
- Cannot delete YSlow bookmark
- yslow npm CLI dead? HOT 1
- Extracting Yslow results?
- Active fork replacement for this project?
- Can't invoke YSlow on Safari? Curious why.
- Curious on supported browsers for javascript based bookmark method
- Test run is not complete
- Permission denied when make pkg HOT 1
- Data fluctuating everytime
- Where has YSlow gone in Chrome? HOT 4
- FontAwesome Pro CDN not recognised
- Invalid manifest HOT 4
- yslow-3.1.8 fails silently + hangs forever HOT 1
- Download links for firefox and chrome return 404 Page not found HOT 8
- phantomjs://code/yslow.js:5 in global code HOT 1
- Request not found in server HOT 1
- Google Chrome extension no longer available HOT 1
- The bookmarklet doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yslow.