Giter Site home page Giter Site logo

freewizard / safariadblock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joshvh/safariadblock

1.0 2.0 1.0 2.09 MB

Block ads in Safari

Home Page: http://burgersoftware.com/safariadblock

License: GNU General Public License v3.0

Ruby 0.34% Shell 4.23% Objective-C 37.46% C++ 57.96%

safariadblock's Introduction

Safari AdBlock
http://burgersoftware.com/safariadblock


INTRODUCTION
==================

Safari AdBlock blocks ads in Safari.
It works as an InputManager to inject code in Safari and uses the Adblock Plus <http://adblockplus.org> filters.



BUILD INSTRUCTIONS
==================

The following command

	sudo xcodebuild install

builds Safari AdBlock and produces an installer located at

	build/Release/Safari AdBlock x.x.x.pkg
	

Alternatively, you can open the Xcode project "Safari AdBlock.xcodeproj" and build it from within Xcode. Note that this method will not produce the installer.



FRAMEWORKS
==================

If you want to build yourself the third-party frameworks, you need to change the dynamic shared library install names recorded in the Mach-O binary. A quick an easy way to do it is to first build the framework without altering the build settings and then work on the executable file. We will take Sparkle as an example.
Start by doing
	
	otool -L Sparkle.framework/Sparkle
	
The output should be something like

	@executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle (compatibility version 1.5.0, current version 1.5.0)
	...
	
What we need to do is change @"executable_path" to "@loader_path" so that when Safari AdBlock is loaded, it looks for the framework inside its bundle and not inside Safari's bundle. It is done with the command

	install_name_tool -id "@loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle" Sparkle.framework/Sparkle

Finally, verify that it worked:

	otool -L Sparkle.framework/Sparkle

now outputs

	@loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle (compatibility version 1.5.0, current version 1.5.0)
	...
	...

safariadblock's People

Contributors

martoche avatar tiennou avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.