├── public
├── icon.png
└── manifest.json
├── .gitignore
├── screenshots
├── files.png
├── safari.png
└── comments.png
├── safari
├── TS Playgrounds.app.zip
└── TS Playgrounds
│ ├── TS Playgrounds
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── 32.png
│ │ │ ├── 128.png
│ │ │ ├── 256.png
│ │ │ ├── 32-1.png
│ │ │ ├── 32-2.png
│ │ │ ├── 128-1.png
│ │ │ ├── 256-1.png
│ │ │ ├── 256-2.png
│ │ │ ├── 256-3.png
│ │ │ ├── 256-4.png
│ │ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── ViewController.m
│ ├── main.m
│ ├── TS_Playgrounds.entitlements
│ ├── AppDelegate.m
│ ├── Info.plist
│ └── Base.lproj
│ │ └── Main.storyboard
│ ├── TS Playgrounds Safari
│ ├── ToolbarItemIcon.pdf
│ ├── script.js
│ ├── SafariExtensionHandler.h
│ ├── TS_Playgrounds_Safari.entitlements
│ ├── SafariExtensionViewController.h
│ ├── SafariExtensionViewController.m
│ ├── SafariExtensionHandler.m
│ ├── Info.plist
│ └── Base.lproj
│ │ └── SafariExtensionViewController.xib
│ └── TS Playgrounds.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── orta.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ ├── xcuserdata
│ └── orta.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
│ └── project.pbxproj
├── webpack
├── webpack.prod.js
├── webpack.dev.js
└── webpack.common.js
├── tsconfig.json
├── package.json
├── README.md
├── LICENSE
└── src
└── add-ts-playground-links.ts
/public/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/public/icon.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 | dist.pem
4 | dist.crx
5 | ts-playground-links.crx
6 | xcuserdata
7 |
--------------------------------------------------------------------------------
/screenshots/files.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/screenshots/files.png
--------------------------------------------------------------------------------
/screenshots/safari.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/screenshots/safari.png
--------------------------------------------------------------------------------
/screenshots/comments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/screenshots/comments.png
--------------------------------------------------------------------------------
/safari/TS Playgrounds.app.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds.app.zip
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds Safari/ToolbarItemIcon.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds/TS Playgrounds Safari/ToolbarItemIcon.pdf
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds Safari/script.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded", function(event) {
2 | safari.extension.dispatchMessage("Hello World!");
3 | });
4 |
--------------------------------------------------------------------------------
/webpack/webpack.prod.js:
--------------------------------------------------------------------------------
1 | const merge = require('webpack-merge');
2 | const common = require('./webpack.common.js');
3 |
4 | module.exports = merge(common, {
5 | mode: 'production'
6 | });
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/32.png
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/128.png
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/256.png
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/32-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/32-1.png
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/32-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/32-2.png
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/128-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/128-1.png
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/256-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/256-1.png
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/256-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/256-2.png
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/256-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/256-3.png
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/256-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/256-4.png
--------------------------------------------------------------------------------
/webpack/webpack.dev.js:
--------------------------------------------------------------------------------
1 | const merge = require('webpack-merge');
2 | const common = require('./webpack.common.js');
3 |
4 | module.exports = merge(common, {
5 | devtool: 'inline-source-map',
6 | mode: 'development'
7 | });
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds.xcodeproj/xcuserdata/orta.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/ViewController.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | NS_ASSUME_NONNULL_BEGIN
5 |
6 | @interface ViewController : NSViewController
7 | @property (weak) IBOutlet WKWebView *webView;
8 |
9 | @end
10 |
11 | NS_ASSUME_NONNULL_END
12 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds.xcodeproj/project.xcworkspace/xcuserdata/orta.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/ts-playgrounds-github/HEAD/safari/TS Playgrounds/TS Playgrounds.xcodeproj/project.xcworkspace/xcuserdata/orta.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es6",
5 | "noImplicitAny": false,
6 | "sourceMap": false,
7 | "rootDir": "src",
8 | "outDir": "dist/js",
9 | "noEmitOnError": true,
10 | "typeRoots": [ "node_modules/@types" ]
11 | }
12 | }
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TS Playgrounds
4 | //
5 | // Created by Orta Therox on 7/29/19.
6 | // Copyright © 2019 Orta Therox. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : NSObject
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/ViewController.m:
--------------------------------------------------------------------------------
1 | #import "ViewController.h"
2 |
3 | @implementation ViewController
4 |
5 | - (void)awakeFromNib
6 | {
7 | [super awakeFromNib];
8 |
9 | NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.typescriptlang.org/play/"]];
10 | [self.webView loadRequest:req];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds Safari/SafariExtensionHandler.h:
--------------------------------------------------------------------------------
1 | //
2 | // SafariExtensionHandler.h
3 | // TS Playgrounds Safari
4 | //
5 | // Created by Orta Therox on 7/29/19.
6 | // Copyright © 2019 Orta Therox. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SafariExtensionHandler : SFSafariExtensionHandler
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds Safari/TS_Playgrounds_Safari.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-only
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TS Playgrounds
4 | //
5 | // Created by Orta Therox on 7/29/19.
6 | // Copyright © 2019 Orta Therox. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, const char * argv[]) {
12 | @autoreleasepool {
13 | // Setup code that might create autoreleased objects goes here.
14 | }
15 | return NSApplicationMain(argc, argv);
16 | }
17 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/TS_Playgrounds.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.network.client
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds Safari/SafariExtensionViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SafariExtensionViewController.h
3 | // TS Playgrounds Safari
4 | //
5 | // Created by Orta Therox on 7/29/19.
6 | // Copyright © 2019 Orta Therox. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SafariExtensionViewController : SFSafariExtensionViewController
12 |
13 | + (SafariExtensionViewController *)sharedController;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 2,
3 |
4 | "name": "GitHub Code-blocks to TypeScript Playground",
5 | "description": "When browsing GitHub, this extension links to the TypeScript playground from every TypeScript-flavoured codeblock",
6 | "version": "0.1",
7 |
8 | "content_scripts": [
9 | {
10 | "matches": ["https://github.com/*"],
11 | "js": ["js/add-ts-playground-links.js"]
12 | }
13 | ],
14 | "permissions": [
15 | "https://github.com/*"
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds.xcodeproj/xcuserdata/orta.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | TS Playgrounds Safari.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 1
11 |
12 | TS Playgrounds.xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 0
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // TS Playgrounds
4 | //
5 | // Created by Orta Therox on 7/29/19.
6 | // Copyright © 2019 Orta Therox. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
18 | // Insert code here to initialize your application
19 | }
20 |
21 |
22 | - (void)applicationWillTerminate:(NSNotification *)aNotification {
23 | // Insert code here to tear down your application
24 | }
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds Safari/SafariExtensionViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SafariExtensionViewController.m
3 | // TS Playgrounds Safari
4 | //
5 | // Created by Orta Therox on 7/29/19.
6 | // Copyright © 2019 Orta Therox. All rights reserved.
7 | //
8 |
9 | #import "SafariExtensionViewController.h"
10 |
11 | @interface SafariExtensionViewController ()
12 |
13 | @end
14 |
15 | @implementation SafariExtensionViewController
16 |
17 | + (SafariExtensionViewController *)sharedController {
18 | static SafariExtensionViewController *sharedController = nil;
19 | static dispatch_once_t onceToken;
20 | dispatch_once(&onceToken, ^{
21 | sharedController = [[SafariExtensionViewController alloc] init];
22 | sharedController.preferredContentSize = NSMakeSize(320, 240);
23 | });
24 | return sharedController;
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "github-codeblocks-typescript",
3 | "version": "1.0.0",
4 | "description": "Adds a link to the TS playground on TypeScript codeblocks in GitHub ",
5 | "main": "index.js",
6 | "scripts": {
7 | "watch": "webpack --config webpack/webpack.dev.js --watch",
8 | "build": "webpack --config webpack/webpack.prod.js",
9 | "clean": "rimraf dist"
10 | },
11 | "author": "Orta Therox",
12 | "license": "MIT",
13 | "repository": {
14 | "type": "git",
15 | "url": "https://github.com/orta/ts-playgrounds-github.git"
16 | },
17 | "dependencies": {},
18 | "devDependencies": {
19 | "@types/chrome": "~0.0.83",
20 | "@types/jquery": "~3.3.29",
21 | "copy-webpack-plugin": "^5.0.3",
22 | "rimraf": "^2.6.3",
23 | "ts-loader": "~5.4.3",
24 | "typescript": "~3.4.5",
25 | "webpack": "~4.17.2",
26 | "webpack-cli": "~3.1.0",
27 | "webpack-merge": "~4.1.4"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Add Links to TypeScript Playground in GitHub
2 |
3 | A Chromium or Safari extension for sending code to the TypeScript playground.
4 |
5 | 
6 |
7 | 
8 |
9 | 
10 |
11 | ## Get it
12 |
13 | - Chromium: [Chrome App Store](https://chrome.google.com/webstore/detail/github-code-blocks-to-typ/ghfbedglkdlaefbpdammobffadckmjaa/related) or [the releases page](https://github.com/orta/ts-playgrounds-github/releases)
14 | - Safari: [the releases page](https://github.com/orta/ts-playgrounds-github/releases)
15 |
16 | ## Dev Setup
17 |
18 | ```sh
19 | yarn install
20 | ```
21 |
22 | ## Build
23 |
24 | ```sh
25 | yarn build
26 | ```
27 |
28 | ## Build in watch mode
29 |
30 | ### terminal
31 |
32 | ```sh
33 | yarn watch
34 | ```
35 |
36 | ## Load extension to chrome
37 |
38 | Open Chrome/Edge/Brave, in the extension settings turn on developer mode, then offer the `dist` directory as an unpacked extension.
39 |
40 | ## Load extension in Safari
41 |
42 | open `safari/TS Playgrounds/TS Playgrounds.xcodeproj` and have a look around.
43 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Orta Therox
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/webpack/webpack.common.js:
--------------------------------------------------------------------------------
1 | const webpack = require("webpack");
2 | const path = require('path');
3 | const CopyPlugin = require('copy-webpack-plugin');
4 | const srcDir = '../src/';
5 |
6 | module.exports = {
7 | entry: {
8 | "add-ts-playground-links": path.join(__dirname, srcDir + 'add-ts-playground-links.ts')
9 | },
10 | output: {
11 | path: path.join(__dirname, '../dist/js'),
12 | filename: '[name].js'
13 | },
14 | optimization: {
15 | splitChunks: {
16 | name: 'vendor',
17 | chunks: "initial"
18 | }
19 | },
20 | module: {
21 | rules: [
22 | {
23 | test: /\.tsx?$/,
24 | use: 'ts-loader',
25 | exclude: /node_modules/
26 | }
27 | ]
28 | },
29 | resolve: {
30 | extensions: ['.ts', '.tsx', '.js']
31 | },
32 | plugins: [
33 | // exclude locale files in moment
34 | new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
35 | new CopyPlugin([
36 | { from: '.', to: '../' }
37 | ],
38 | {context: 'public' }
39 | ),
40 | ]
41 | };
42 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSApplicationCategoryType
24 | public.app-category.developer-tools
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSHumanReadableCopyright
28 | Copyright © 2019 Orta Therox. All rights reserved.
29 | NSMainStoryboardFile
30 | Main
31 | NSPrincipalClass
32 | NSApplication
33 | NSSupportsAutomaticTermination
34 |
35 | NSSupportsSuddenTermination
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "32-2.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "32-1.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "128-1.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "256-4.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "256-3.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "256-2.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "256-1.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "256.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds Safari/SafariExtensionHandler.m:
--------------------------------------------------------------------------------
1 | //
2 | // SafariExtensionHandler.m
3 | // TS Playgrounds Safari
4 | //
5 | // Created by Orta Therox on 7/29/19.
6 | // Copyright © 2019 Orta Therox. All rights reserved.
7 | //
8 |
9 | #import "SafariExtensionHandler.h"
10 | #import "SafariExtensionViewController.h"
11 |
12 | @interface SafariExtensionHandler ()
13 |
14 | @end
15 |
16 | @implementation SafariExtensionHandler
17 |
18 | - (void)messageReceivedWithName:(NSString *)messageName fromPage:(SFSafariPage *)page userInfo:(NSDictionary *)userInfo {
19 | // This method will be called when a content script provided by your extension calls safari.extension.dispatchMessage("message").
20 | [page getPagePropertiesWithCompletionHandler:^(SFSafariPageProperties *properties) {
21 | NSLog(@"The extension received a message (%@) from a script injected into (%@) with userInfo (%@)", messageName, properties.url, userInfo);
22 | }];
23 | }
24 |
25 | - (void)toolbarItemClickedInWindow:(SFSafariWindow *)window {
26 | // This method will be called when your toolbar item is clicked.
27 | NSLog(@"The extension's toolbar item was clicked");
28 | }
29 |
30 | - (void)validateToolbarItemInWindow:(SFSafariWindow *)window validationHandler:(void (^)(BOOL enabled, NSString *badgeText))validationHandler {
31 | // This method will be called whenever some state changes in the passed in window. You should use this as a chance to enable or disable your toolbar item and set badge text.
32 | validationHandler(YES, nil);
33 | }
34 |
35 | - (SFSafariExtensionViewController *)popoverViewController {
36 | return [SafariExtensionViewController sharedController];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds Safari/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | TS Playgrounds Safari
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSExtension
26 |
27 | NSExtensionPointIdentifier
28 | com.apple.Safari.extension
29 | NSExtensionPrincipalClass
30 | SafariExtensionHandler
31 | SFSafariContentScript
32 |
33 |
34 | Script
35 | add-ts-playground-links.js
36 |
37 |
38 | SFSafariWebsiteAccess
39 |
40 | Allowed Domains
41 |
42 | *.github.com
43 |
44 | Level
45 | Some
46 |
47 |
48 | NSHumanReadableCopyright
49 | Copyright © 2019 Orta Therox. All rights reserved.
50 | NSHumanReadableDescription
51 | This is a Safari Extension. You should tell us what your extension does here.
52 |
53 |
54 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds Safari/Base.lproj/SafariExtensionViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/add-ts-playground-links.ts:
--------------------------------------------------------------------------------
1 | const createAnchorForString = (text: string, onclick?: any) => {
2 | const link = document.createElement("a");
3 | if (text) {
4 | link.href = "https://www.typescriptlang.org/play/#src=" + encodeURI(text);
5 | }
6 | link.text = "TS";
7 | link.style.position = "absolute";
8 | link.style.textAlign = "right";
9 | link.style.color = "white";
10 | link.style.backgroundColor = "#187ABF";
11 | link.style.width = "30px";
12 | link.style.height = "30px";
13 | link.style.lineHeight = "44px";
14 | link.style.paddingRight = "2px";
15 | link.style.right = "4px";
16 | link.style.bottom = "4px";
17 | link.style.borderRadius = "2px";
18 |
19 | if (onclick) {
20 | link.onclick = onclick;
21 | }
22 | return link;
23 | };
24 |
25 | const addLinkToFile = (allMainBlocks: HTMLCollectionOf) => {
26 | for (const block of allMainBlocks) {
27 | // @ts-ignore
28 | // This exists for sure at runtime
29 | block.style.position = "relative";
30 |
31 | const a = createAnchorForString(undefined, () => {
32 | // https://github.com/danger/danger-js/blob/master/dangerfile.ts
33 | // to
34 | // https://raw.githubusercontent.com/danger/danger-js/master/dangerfile.ts
35 | // then grab the raw text content
36 | const paths = document.location.pathname.split("/");
37 | const pathComponents = paths.slice(4).join("/");
38 | const newPath = `https://raw.githubusercontent.com${paths[0]}/${paths[1]}/${paths[2]}/${pathComponents}`;
39 | fetch(newPath)
40 | .then(res => res.text())
41 | .then(text => {
42 | window.location.href = "https://www.typescriptlang.org/play/#src=" + encodeURI(text);
43 | });
44 | });
45 | block.parentNode.appendChild(a);
46 | }
47 | };
48 |
49 | const addLinkToCodeblocks = (allCodeBlocks: HTMLCollectionOf) => {
50 | for (const block of allCodeBlocks) {
51 | // @ts-ignore
52 | // This exists for sure at runtime
53 | block.style.position = "relative";
54 |
55 | const a = createAnchorForString(block.textContent);
56 | block.appendChild(a);
57 | }
58 | };
59 |
60 | const observer =
61 | new MutationObserver((mutations: MutationRecord[]) => {
62 | addLinkToCodeblocksInMarkdown()
63 | });
64 |
65 | const addLinkToCodeblocksInMarkdown = () => {
66 | const allInlineCodeBlocks = document.getElementsByClassName("highlight-source-ts");
67 | if (allInlineCodeBlocks.length) {
68 | addLinkToCodeblocks(allInlineCodeBlocks);
69 | }
70 | };
71 |
72 | const listenToNewComments = () => {
73 | const commentsContainer = document.getElementsByClassName("js-discussion")[0];
74 |
75 | if (commentsContainer) {
76 | // This will be triggered every time a new comment is added, allowing us
77 | // to link new TypeScript blocks as they are created.
78 | observer.observe(commentsContainer as Node, {
79 | attributes: false,
80 | childList: true,
81 | });
82 | }
83 | };
84 |
85 | setTimeout(() => {
86 | const mainTSFiles = document.getElementsByClassName("type-typescript");
87 | if (mainTSFiles.length) {
88 | addLinkToFile(mainTSFiles);
89 | }
90 |
91 | addLinkToCodeblocksInMarkdown();
92 | listenToNewComments();
93 | }, 300);
94 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 6084509222EF1D9A00802CE3 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6084509122EF1D9A00802CE3 /* AppDelegate.m */; };
11 | 6084509422EF1D9B00802CE3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6084509322EF1D9B00802CE3 /* Assets.xcassets */; };
12 | 6084509722EF1D9B00802CE3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6084509522EF1D9B00802CE3 /* Main.storyboard */; };
13 | 6084509A22EF1D9B00802CE3 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6084509922EF1D9B00802CE3 /* main.m */; };
14 | 608450A822EF1DCF00802CE3 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 608450A722EF1DCF00802CE3 /* Cocoa.framework */; };
15 | 608450AC22EF1DCF00802CE3 /* SafariExtensionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 608450AB22EF1DCF00802CE3 /* SafariExtensionHandler.m */; };
16 | 608450AF22EF1DCF00802CE3 /* SafariExtensionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 608450AE22EF1DCF00802CE3 /* SafariExtensionViewController.m */; };
17 | 608450B222EF1DCF00802CE3 /* SafariExtensionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 608450B022EF1DCF00802CE3 /* SafariExtensionViewController.xib */; };
18 | 608450B522EF1DCF00802CE3 /* script.js in Resources */ = {isa = PBXBuildFile; fileRef = 608450B422EF1DCF00802CE3 /* script.js */; };
19 | 608450B722EF1DCF00802CE3 /* ToolbarItemIcon.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 608450B622EF1DCF00802CE3 /* ToolbarItemIcon.pdf */; };
20 | 608450BB22EF1DCF00802CE3 /* TS Playgrounds Safari.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 608450A522EF1DCF00802CE3 /* TS Playgrounds Safari.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
21 | 608450C122EF1E6200802CE3 /* add-ts-playground-links.js in Resources */ = {isa = PBXBuildFile; fileRef = 608450C022EF1E6200802CE3 /* add-ts-playground-links.js */; };
22 | 60C7997522EF203800B18E98 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 60C7997422EF203800B18E98 /* ViewController.m */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXContainerItemProxy section */
26 | 608450B922EF1DCF00802CE3 /* PBXContainerItemProxy */ = {
27 | isa = PBXContainerItemProxy;
28 | containerPortal = 6084508522EF1D9A00802CE3 /* Project object */;
29 | proxyType = 1;
30 | remoteGlobalIDString = 608450A422EF1DCF00802CE3;
31 | remoteInfo = "TS Playgrounds Safari";
32 | };
33 | /* End PBXContainerItemProxy section */
34 |
35 | /* Begin PBXCopyFilesBuildPhase section */
36 | 608450BF22EF1DCF00802CE3 /* Embed App Extensions */ = {
37 | isa = PBXCopyFilesBuildPhase;
38 | buildActionMask = 2147483647;
39 | dstPath = "";
40 | dstSubfolderSpec = 13;
41 | files = (
42 | 608450BB22EF1DCF00802CE3 /* TS Playgrounds Safari.appex in Embed App Extensions */,
43 | );
44 | name = "Embed App Extensions";
45 | runOnlyForDeploymentPostprocessing = 0;
46 | };
47 | /* End PBXCopyFilesBuildPhase section */
48 |
49 | /* Begin PBXFileReference section */
50 | 6084508D22EF1D9A00802CE3 /* TS Playgrounds.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TS Playgrounds.app"; sourceTree = BUILT_PRODUCTS_DIR; };
51 | 6084509022EF1D9A00802CE3 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
52 | 6084509122EF1D9A00802CE3 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
53 | 6084509322EF1D9B00802CE3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
54 | 6084509622EF1D9B00802CE3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
55 | 6084509822EF1D9B00802CE3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
56 | 6084509922EF1D9B00802CE3 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
57 | 6084509B22EF1D9B00802CE3 /* TS_Playgrounds.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TS_Playgrounds.entitlements; sourceTree = ""; };
58 | 608450A522EF1DCF00802CE3 /* TS Playgrounds Safari.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "TS Playgrounds Safari.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
59 | 608450A722EF1DCF00802CE3 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
60 | 608450AA22EF1DCF00802CE3 /* SafariExtensionHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SafariExtensionHandler.h; sourceTree = ""; };
61 | 608450AB22EF1DCF00802CE3 /* SafariExtensionHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SafariExtensionHandler.m; sourceTree = ""; };
62 | 608450AD22EF1DCF00802CE3 /* SafariExtensionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SafariExtensionViewController.h; sourceTree = ""; };
63 | 608450AE22EF1DCF00802CE3 /* SafariExtensionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SafariExtensionViewController.m; sourceTree = ""; };
64 | 608450B122EF1DCF00802CE3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/SafariExtensionViewController.xib; sourceTree = ""; };
65 | 608450B322EF1DCF00802CE3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
66 | 608450B422EF1DCF00802CE3 /* script.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = script.js; sourceTree = ""; };
67 | 608450B622EF1DCF00802CE3 /* ToolbarItemIcon.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = ToolbarItemIcon.pdf; sourceTree = ""; };
68 | 608450B822EF1DCF00802CE3 /* TS_Playgrounds_Safari.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TS_Playgrounds_Safari.entitlements; sourceTree = ""; };
69 | 608450C022EF1E6200802CE3 /* add-ts-playground-links.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "add-ts-playground-links.js"; path = "../../../dist/js/add-ts-playground-links.js"; sourceTree = ""; };
70 | 60C7997322EF203800B18E98 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
71 | 60C7997422EF203800B18E98 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
72 | /* End PBXFileReference section */
73 |
74 | /* Begin PBXFrameworksBuildPhase section */
75 | 6084508A22EF1D9A00802CE3 /* Frameworks */ = {
76 | isa = PBXFrameworksBuildPhase;
77 | buildActionMask = 2147483647;
78 | files = (
79 | );
80 | runOnlyForDeploymentPostprocessing = 0;
81 | };
82 | 608450A222EF1DCF00802CE3 /* Frameworks */ = {
83 | isa = PBXFrameworksBuildPhase;
84 | buildActionMask = 2147483647;
85 | files = (
86 | 608450A822EF1DCF00802CE3 /* Cocoa.framework in Frameworks */,
87 | );
88 | runOnlyForDeploymentPostprocessing = 0;
89 | };
90 | /* End PBXFrameworksBuildPhase section */
91 |
92 | /* Begin PBXGroup section */
93 | 6084508422EF1D9A00802CE3 = {
94 | isa = PBXGroup;
95 | children = (
96 | 6084508F22EF1D9A00802CE3 /* TS Playgrounds */,
97 | 608450A922EF1DCF00802CE3 /* TS Playgrounds Safari */,
98 | 608450A622EF1DCF00802CE3 /* Frameworks */,
99 | 6084508E22EF1D9A00802CE3 /* Products */,
100 | );
101 | sourceTree = "";
102 | };
103 | 6084508E22EF1D9A00802CE3 /* Products */ = {
104 | isa = PBXGroup;
105 | children = (
106 | 6084508D22EF1D9A00802CE3 /* TS Playgrounds.app */,
107 | 608450A522EF1DCF00802CE3 /* TS Playgrounds Safari.appex */,
108 | );
109 | name = Products;
110 | sourceTree = "";
111 | };
112 | 6084508F22EF1D9A00802CE3 /* TS Playgrounds */ = {
113 | isa = PBXGroup;
114 | children = (
115 | 6084509022EF1D9A00802CE3 /* AppDelegate.h */,
116 | 6084509122EF1D9A00802CE3 /* AppDelegate.m */,
117 | 6084509322EF1D9B00802CE3 /* Assets.xcassets */,
118 | 6084509522EF1D9B00802CE3 /* Main.storyboard */,
119 | 6084509822EF1D9B00802CE3 /* Info.plist */,
120 | 6084509922EF1D9B00802CE3 /* main.m */,
121 | 6084509B22EF1D9B00802CE3 /* TS_Playgrounds.entitlements */,
122 | 60C7997322EF203800B18E98 /* ViewController.h */,
123 | 60C7997422EF203800B18E98 /* ViewController.m */,
124 | );
125 | path = "TS Playgrounds";
126 | sourceTree = "";
127 | };
128 | 608450A622EF1DCF00802CE3 /* Frameworks */ = {
129 | isa = PBXGroup;
130 | children = (
131 | 608450A722EF1DCF00802CE3 /* Cocoa.framework */,
132 | );
133 | name = Frameworks;
134 | sourceTree = "";
135 | };
136 | 608450A922EF1DCF00802CE3 /* TS Playgrounds Safari */ = {
137 | isa = PBXGroup;
138 | children = (
139 | 608450AA22EF1DCF00802CE3 /* SafariExtensionHandler.h */,
140 | 608450AB22EF1DCF00802CE3 /* SafariExtensionHandler.m */,
141 | 608450AD22EF1DCF00802CE3 /* SafariExtensionViewController.h */,
142 | 608450AE22EF1DCF00802CE3 /* SafariExtensionViewController.m */,
143 | 608450B022EF1DCF00802CE3 /* SafariExtensionViewController.xib */,
144 | 608450B322EF1DCF00802CE3 /* Info.plist */,
145 | 608450B422EF1DCF00802CE3 /* script.js */,
146 | 608450C022EF1E6200802CE3 /* add-ts-playground-links.js */,
147 | 608450B622EF1DCF00802CE3 /* ToolbarItemIcon.pdf */,
148 | 608450B822EF1DCF00802CE3 /* TS_Playgrounds_Safari.entitlements */,
149 | );
150 | path = "TS Playgrounds Safari";
151 | sourceTree = "";
152 | };
153 | /* End PBXGroup section */
154 |
155 | /* Begin PBXNativeTarget section */
156 | 6084508C22EF1D9A00802CE3 /* TS Playgrounds */ = {
157 | isa = PBXNativeTarget;
158 | buildConfigurationList = 6084509E22EF1D9B00802CE3 /* Build configuration list for PBXNativeTarget "TS Playgrounds" */;
159 | buildPhases = (
160 | 6084508922EF1D9A00802CE3 /* Sources */,
161 | 6084508A22EF1D9A00802CE3 /* Frameworks */,
162 | 6084508B22EF1D9A00802CE3 /* Resources */,
163 | 608450BF22EF1DCF00802CE3 /* Embed App Extensions */,
164 | );
165 | buildRules = (
166 | );
167 | dependencies = (
168 | 608450BA22EF1DCF00802CE3 /* PBXTargetDependency */,
169 | );
170 | name = "TS Playgrounds";
171 | productName = "TS Playgrounds";
172 | productReference = 6084508D22EF1D9A00802CE3 /* TS Playgrounds.app */;
173 | productType = "com.apple.product-type.application";
174 | };
175 | 608450A422EF1DCF00802CE3 /* TS Playgrounds Safari */ = {
176 | isa = PBXNativeTarget;
177 | buildConfigurationList = 608450BC22EF1DCF00802CE3 /* Build configuration list for PBXNativeTarget "TS Playgrounds Safari" */;
178 | buildPhases = (
179 | 608450A122EF1DCF00802CE3 /* Sources */,
180 | 608450A222EF1DCF00802CE3 /* Frameworks */,
181 | 608450A322EF1DCF00802CE3 /* Resources */,
182 | );
183 | buildRules = (
184 | );
185 | dependencies = (
186 | );
187 | name = "TS Playgrounds Safari";
188 | productName = "TS Playgrounds Safari";
189 | productReference = 608450A522EF1DCF00802CE3 /* TS Playgrounds Safari.appex */;
190 | productType = "com.apple.product-type.app-extension";
191 | };
192 | /* End PBXNativeTarget section */
193 |
194 | /* Begin PBXProject section */
195 | 6084508522EF1D9A00802CE3 /* Project object */ = {
196 | isa = PBXProject;
197 | attributes = {
198 | LastUpgradeCheck = 1100;
199 | ORGANIZATIONNAME = "Orta Therox";
200 | TargetAttributes = {
201 | 6084508C22EF1D9A00802CE3 = {
202 | CreatedOnToolsVersion = 11.0;
203 | };
204 | 608450A422EF1DCF00802CE3 = {
205 | CreatedOnToolsVersion = 11.0;
206 | };
207 | };
208 | };
209 | buildConfigurationList = 6084508822EF1D9A00802CE3 /* Build configuration list for PBXProject "TS Playgrounds" */;
210 | compatibilityVersion = "Xcode 9.3";
211 | developmentRegion = en;
212 | hasScannedForEncodings = 0;
213 | knownRegions = (
214 | en,
215 | Base,
216 | );
217 | mainGroup = 6084508422EF1D9A00802CE3;
218 | productRefGroup = 6084508E22EF1D9A00802CE3 /* Products */;
219 | projectDirPath = "";
220 | projectRoot = "";
221 | targets = (
222 | 6084508C22EF1D9A00802CE3 /* TS Playgrounds */,
223 | 608450A422EF1DCF00802CE3 /* TS Playgrounds Safari */,
224 | );
225 | };
226 | /* End PBXProject section */
227 |
228 | /* Begin PBXResourcesBuildPhase section */
229 | 6084508B22EF1D9A00802CE3 /* Resources */ = {
230 | isa = PBXResourcesBuildPhase;
231 | buildActionMask = 2147483647;
232 | files = (
233 | 6084509422EF1D9B00802CE3 /* Assets.xcassets in Resources */,
234 | 6084509722EF1D9B00802CE3 /* Main.storyboard in Resources */,
235 | );
236 | runOnlyForDeploymentPostprocessing = 0;
237 | };
238 | 608450A322EF1DCF00802CE3 /* Resources */ = {
239 | isa = PBXResourcesBuildPhase;
240 | buildActionMask = 2147483647;
241 | files = (
242 | 608450B722EF1DCF00802CE3 /* ToolbarItemIcon.pdf in Resources */,
243 | 608450B222EF1DCF00802CE3 /* SafariExtensionViewController.xib in Resources */,
244 | 608450C122EF1E6200802CE3 /* add-ts-playground-links.js in Resources */,
245 | 608450B522EF1DCF00802CE3 /* script.js in Resources */,
246 | );
247 | runOnlyForDeploymentPostprocessing = 0;
248 | };
249 | /* End PBXResourcesBuildPhase section */
250 |
251 | /* Begin PBXSourcesBuildPhase section */
252 | 6084508922EF1D9A00802CE3 /* Sources */ = {
253 | isa = PBXSourcesBuildPhase;
254 | buildActionMask = 2147483647;
255 | files = (
256 | 60C7997522EF203800B18E98 /* ViewController.m in Sources */,
257 | 6084509A22EF1D9B00802CE3 /* main.m in Sources */,
258 | 6084509222EF1D9A00802CE3 /* AppDelegate.m in Sources */,
259 | );
260 | runOnlyForDeploymentPostprocessing = 0;
261 | };
262 | 608450A122EF1DCF00802CE3 /* Sources */ = {
263 | isa = PBXSourcesBuildPhase;
264 | buildActionMask = 2147483647;
265 | files = (
266 | 608450AF22EF1DCF00802CE3 /* SafariExtensionViewController.m in Sources */,
267 | 608450AC22EF1DCF00802CE3 /* SafariExtensionHandler.m in Sources */,
268 | );
269 | runOnlyForDeploymentPostprocessing = 0;
270 | };
271 | /* End PBXSourcesBuildPhase section */
272 |
273 | /* Begin PBXTargetDependency section */
274 | 608450BA22EF1DCF00802CE3 /* PBXTargetDependency */ = {
275 | isa = PBXTargetDependency;
276 | target = 608450A422EF1DCF00802CE3 /* TS Playgrounds Safari */;
277 | targetProxy = 608450B922EF1DCF00802CE3 /* PBXContainerItemProxy */;
278 | };
279 | /* End PBXTargetDependency section */
280 |
281 | /* Begin PBXVariantGroup section */
282 | 6084509522EF1D9B00802CE3 /* Main.storyboard */ = {
283 | isa = PBXVariantGroup;
284 | children = (
285 | 6084509622EF1D9B00802CE3 /* Base */,
286 | );
287 | name = Main.storyboard;
288 | sourceTree = "";
289 | };
290 | 608450B022EF1DCF00802CE3 /* SafariExtensionViewController.xib */ = {
291 | isa = PBXVariantGroup;
292 | children = (
293 | 608450B122EF1DCF00802CE3 /* Base */,
294 | );
295 | name = SafariExtensionViewController.xib;
296 | sourceTree = "";
297 | };
298 | /* End PBXVariantGroup section */
299 |
300 | /* Begin XCBuildConfiguration section */
301 | 6084509C22EF1D9B00802CE3 /* Debug */ = {
302 | isa = XCBuildConfiguration;
303 | buildSettings = {
304 | ALWAYS_SEARCH_USER_PATHS = NO;
305 | CLANG_ANALYZER_NONNULL = YES;
306 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
308 | CLANG_CXX_LIBRARY = "libc++";
309 | CLANG_ENABLE_MODULES = YES;
310 | CLANG_ENABLE_OBJC_ARC = YES;
311 | CLANG_ENABLE_OBJC_WEAK = YES;
312 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
313 | CLANG_WARN_BOOL_CONVERSION = YES;
314 | CLANG_WARN_COMMA = YES;
315 | CLANG_WARN_CONSTANT_CONVERSION = YES;
316 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
317 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
318 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
319 | CLANG_WARN_EMPTY_BODY = YES;
320 | CLANG_WARN_ENUM_CONVERSION = YES;
321 | CLANG_WARN_INFINITE_RECURSION = YES;
322 | CLANG_WARN_INT_CONVERSION = YES;
323 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
324 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
325 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
326 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
327 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
328 | CLANG_WARN_STRICT_PROTOTYPES = YES;
329 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
330 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
331 | CLANG_WARN_UNREACHABLE_CODE = YES;
332 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
333 | COPY_PHASE_STRIP = NO;
334 | DEBUG_INFORMATION_FORMAT = dwarf;
335 | ENABLE_STRICT_OBJC_MSGSEND = YES;
336 | ENABLE_TESTABILITY = YES;
337 | GCC_C_LANGUAGE_STANDARD = gnu11;
338 | GCC_DYNAMIC_NO_PIC = NO;
339 | GCC_NO_COMMON_BLOCKS = YES;
340 | GCC_OPTIMIZATION_LEVEL = 0;
341 | GCC_PREPROCESSOR_DEFINITIONS = (
342 | "DEBUG=1",
343 | "$(inherited)",
344 | );
345 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
346 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
347 | GCC_WARN_UNDECLARED_SELECTOR = YES;
348 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
349 | GCC_WARN_UNUSED_FUNCTION = YES;
350 | GCC_WARN_UNUSED_VARIABLE = YES;
351 | MACOSX_DEPLOYMENT_TARGET = 10.15;
352 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
353 | MTL_FAST_MATH = YES;
354 | ONLY_ACTIVE_ARCH = YES;
355 | SDKROOT = macosx;
356 | };
357 | name = Debug;
358 | };
359 | 6084509D22EF1D9B00802CE3 /* Release */ = {
360 | isa = XCBuildConfiguration;
361 | buildSettings = {
362 | ALWAYS_SEARCH_USER_PATHS = NO;
363 | CLANG_ANALYZER_NONNULL = YES;
364 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
365 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
366 | CLANG_CXX_LIBRARY = "libc++";
367 | CLANG_ENABLE_MODULES = YES;
368 | CLANG_ENABLE_OBJC_ARC = YES;
369 | CLANG_ENABLE_OBJC_WEAK = YES;
370 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
371 | CLANG_WARN_BOOL_CONVERSION = YES;
372 | CLANG_WARN_COMMA = YES;
373 | CLANG_WARN_CONSTANT_CONVERSION = YES;
374 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
375 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
376 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
377 | CLANG_WARN_EMPTY_BODY = YES;
378 | CLANG_WARN_ENUM_CONVERSION = YES;
379 | CLANG_WARN_INFINITE_RECURSION = YES;
380 | CLANG_WARN_INT_CONVERSION = YES;
381 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
382 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
383 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
384 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
385 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
386 | CLANG_WARN_STRICT_PROTOTYPES = YES;
387 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
388 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
389 | CLANG_WARN_UNREACHABLE_CODE = YES;
390 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
391 | COPY_PHASE_STRIP = NO;
392 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
393 | ENABLE_NS_ASSERTIONS = NO;
394 | ENABLE_STRICT_OBJC_MSGSEND = YES;
395 | GCC_C_LANGUAGE_STANDARD = gnu11;
396 | GCC_NO_COMMON_BLOCKS = YES;
397 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
398 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
399 | GCC_WARN_UNDECLARED_SELECTOR = YES;
400 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
401 | GCC_WARN_UNUSED_FUNCTION = YES;
402 | GCC_WARN_UNUSED_VARIABLE = YES;
403 | MACOSX_DEPLOYMENT_TARGET = 10.15;
404 | MTL_ENABLE_DEBUG_INFO = NO;
405 | MTL_FAST_MATH = YES;
406 | SDKROOT = macosx;
407 | };
408 | name = Release;
409 | };
410 | 6084509F22EF1D9B00802CE3 /* Debug */ = {
411 | isa = XCBuildConfiguration;
412 | buildSettings = {
413 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
414 | CODE_SIGN_ENTITLEMENTS = "TS Playgrounds/TS_Playgrounds.entitlements";
415 | CODE_SIGN_STYLE = Automatic;
416 | COMBINE_HIDPI_IMAGES = YES;
417 | DEVELOPMENT_TEAM = DL8L9H58NG;
418 | ENABLE_HARDENED_RUNTIME = YES;
419 | INFOPLIST_FILE = "TS Playgrounds/Info.plist";
420 | LD_RUNPATH_SEARCH_PATHS = (
421 | "$(inherited)",
422 | "@executable_path/../Frameworks",
423 | );
424 | MACOSX_DEPLOYMENT_TARGET = 10.13;
425 | PRODUCT_BUNDLE_IDENTIFIER = "orta.io.TS-Playgrounds";
426 | PRODUCT_NAME = "$(TARGET_NAME)";
427 | };
428 | name = Debug;
429 | };
430 | 608450A022EF1D9B00802CE3 /* Release */ = {
431 | isa = XCBuildConfiguration;
432 | buildSettings = {
433 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
434 | CODE_SIGN_ENTITLEMENTS = "TS Playgrounds/TS_Playgrounds.entitlements";
435 | CODE_SIGN_STYLE = Automatic;
436 | COMBINE_HIDPI_IMAGES = YES;
437 | DEVELOPMENT_TEAM = DL8L9H58NG;
438 | ENABLE_HARDENED_RUNTIME = YES;
439 | INFOPLIST_FILE = "TS Playgrounds/Info.plist";
440 | LD_RUNPATH_SEARCH_PATHS = (
441 | "$(inherited)",
442 | "@executable_path/../Frameworks",
443 | );
444 | MACOSX_DEPLOYMENT_TARGET = 10.13;
445 | PRODUCT_BUNDLE_IDENTIFIER = "orta.io.TS-Playgrounds";
446 | PRODUCT_NAME = "$(TARGET_NAME)";
447 | };
448 | name = Release;
449 | };
450 | 608450BD22EF1DCF00802CE3 /* Debug */ = {
451 | isa = XCBuildConfiguration;
452 | buildSettings = {
453 | CODE_SIGN_ENTITLEMENTS = "TS Playgrounds Safari/TS_Playgrounds_Safari.entitlements";
454 | CODE_SIGN_STYLE = Automatic;
455 | DEVELOPMENT_TEAM = DL8L9H58NG;
456 | ENABLE_HARDENED_RUNTIME = YES;
457 | INFOPLIST_FILE = "TS Playgrounds Safari/Info.plist";
458 | LD_RUNPATH_SEARCH_PATHS = (
459 | "$(inherited)",
460 | "@executable_path/../Frameworks",
461 | "@executable_path/../../../../Frameworks",
462 | );
463 | MACOSX_DEPLOYMENT_TARGET = 10.13;
464 | PRODUCT_BUNDLE_IDENTIFIER = "orta.io.TS-Playgrounds.TS-Playgrounds-Safari";
465 | PRODUCT_NAME = "$(TARGET_NAME)";
466 | SKIP_INSTALL = YES;
467 | };
468 | name = Debug;
469 | };
470 | 608450BE22EF1DCF00802CE3 /* Release */ = {
471 | isa = XCBuildConfiguration;
472 | buildSettings = {
473 | CODE_SIGN_ENTITLEMENTS = "TS Playgrounds Safari/TS_Playgrounds_Safari.entitlements";
474 | CODE_SIGN_STYLE = Automatic;
475 | DEVELOPMENT_TEAM = DL8L9H58NG;
476 | ENABLE_HARDENED_RUNTIME = YES;
477 | INFOPLIST_FILE = "TS Playgrounds Safari/Info.plist";
478 | LD_RUNPATH_SEARCH_PATHS = (
479 | "$(inherited)",
480 | "@executable_path/../Frameworks",
481 | "@executable_path/../../../../Frameworks",
482 | );
483 | MACOSX_DEPLOYMENT_TARGET = 10.13;
484 | PRODUCT_BUNDLE_IDENTIFIER = "orta.io.TS-Playgrounds.TS-Playgrounds-Safari";
485 | PRODUCT_NAME = "$(TARGET_NAME)";
486 | SKIP_INSTALL = YES;
487 | };
488 | name = Release;
489 | };
490 | /* End XCBuildConfiguration section */
491 |
492 | /* Begin XCConfigurationList section */
493 | 6084508822EF1D9A00802CE3 /* Build configuration list for PBXProject "TS Playgrounds" */ = {
494 | isa = XCConfigurationList;
495 | buildConfigurations = (
496 | 6084509C22EF1D9B00802CE3 /* Debug */,
497 | 6084509D22EF1D9B00802CE3 /* Release */,
498 | );
499 | defaultConfigurationIsVisible = 0;
500 | defaultConfigurationName = Release;
501 | };
502 | 6084509E22EF1D9B00802CE3 /* Build configuration list for PBXNativeTarget "TS Playgrounds" */ = {
503 | isa = XCConfigurationList;
504 | buildConfigurations = (
505 | 6084509F22EF1D9B00802CE3 /* Debug */,
506 | 608450A022EF1D9B00802CE3 /* Release */,
507 | );
508 | defaultConfigurationIsVisible = 0;
509 | defaultConfigurationName = Release;
510 | };
511 | 608450BC22EF1DCF00802CE3 /* Build configuration list for PBXNativeTarget "TS Playgrounds Safari" */ = {
512 | isa = XCConfigurationList;
513 | buildConfigurations = (
514 | 608450BD22EF1DCF00802CE3 /* Debug */,
515 | 608450BE22EF1DCF00802CE3 /* Release */,
516 | );
517 | defaultConfigurationIsVisible = 0;
518 | defaultConfigurationName = Release;
519 | };
520 | /* End XCConfigurationList section */
521 | };
522 | rootObject = 6084508522EF1D9A00802CE3 /* Project object */;
523 | }
524 |
--------------------------------------------------------------------------------
/safari/TS Playgrounds/TS Playgrounds/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
700 |
701 |
702 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 |
715 |
716 |
717 |
718 |
719 |
720 |
721 |
722 |
723 |
724 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
--------------------------------------------------------------------------------