⬆️ ⬇️

Returning the old Web Inspector in Safari 6

I am sure that I am not alone in my torment with the new devtools in the new Safari. And when they once again defeated me, I, as a rational man, turned to Google for help.





Google offered me several options for getting rid of suffering:



  1. use the menu Develop> Use WebKit Web Inspector
  2. storm Apple support
  3. use webkit instead of safari


The first option did not suit me due to the lack of such a menu item in the existing Safari builds.

The second did not fit due to the low probability of a positive outcome.

The third was not satisfied with the fact that WebKit was in conflict with some extension installed in Safari and when trying to open any page it was a little harder for ya.ru to hang on tight. To deal with it was broke, and I didn’t really want to produce a zoo from browsers (I have so installed seven of them).

If you are not confused by WebKit, then you can safely use it and do not read further.



')

Since WebKit is not very different from Safari, and there are old and new devtools in it, I’ve got to pick its insides. As a result, the inspector directory was discovered in its depths, prompting quite understandable thoughts that, as a result of a sekas with various builds, led to the solution of the problem.





Result







Recipe



For lazy people below, there is an installer who will do everything himself.

For the curious in order:





  1. Load WebKit and mount the image.
  2. Copy files from the /Volumes/WebKit/WebKit.app/Contents/Frameworks/10.7/ directory

    WebCore.framework / Versions / A / Resources / inspector in /System/Library/PrivateFrameworks/WebInspector.framework/Versions/Current/Resources
  3. Rename inspector.html to Main.html
  4. Enjoy


Same machine-readable language:
# make original inspector backup sudo cp -RH /System/Library/PrivateFrameworks/WebInspector.framework /System/Library/PrivateFrameworks/WebInspector.framework.backup # copy WebKit inspector sudo cp -RH /Volumes/WebKit/WebKit.app/Contents/Frameworks/10.7/WebCore.framework/Versions/A/Resources/inspector/* /System/Library/PrivateFrameworks/WebInspector.framework/Versions/Current/Resources sudo mv /System/Library/PrivateFrameworks/WebInspector.framework/Versions/Current/Resources/inspector.html /System/Library/PrivateFrameworks/WebInspector.framework/Versions/Current/Resources/Main.html 


As you can see in the video, I painted the inspector a bit. The method was borrowed here and slightly adapted to Safari.

If you do not like this design, just run in the console:

 sudo sed -i'.bak' '2781,$d' /System/Library/PrivateFrameworks/WebInspector.framework/Versions/A/Resources/inspector.css 
and restart Safari.



It was tested on Safari 6.0.1 and 6.0.2 on the English and Russian systems (10.8.2). No significant stocks were identified.



Have a nice dev-a.



Installer

Source: https://habr.com/ru/post/163479/



All Articles