Skip to content

Latest commit

 

History

History
 
 

25-Project19

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Project 19 - Javascript Injection

https://www.hackingwithswift.com/100/67

Includes solutions to the challenges.

Bonus:

  • Swipe to delete from table

Topics

Safari Extensions, NSExtensionItem, UITextView, NotificationCenter

Challenges

From Hacking with Swift:

  1. Add a bar button item that lets users select from a handful of prewritten example scripts, shown using a UIAlertController – at the very least your list should include the example we used in this project.
  2. You're already receiving the URL of the site the user is on, so use UserDefaults to save the user's JavaScript for each site. You should convert the URL to a URL object in order to use its host property.
  3. For something bigger, let users name their scripts, then select one to load using a UITableView.

Screenshots

screenshot1 screenshot2 screenshot3 screenshot4