forked from vendetta-mod/VendettaTweak
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from bunny-mod/feat-safari-extension
- Loading branch information
Showing
16 changed files
with
478 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
BasedOnStyle: LLVM | ||
IndentWidth: 4 | ||
ObjCBlockIndentWidth: 4 | ||
UseTab: Never | ||
ColumnLimit: 100 | ||
AccessModifierOffset: -4 | ||
AllowShortBlocksOnASingleLine: Empty | ||
AllowShortFunctionsOnASingleLine: Empty | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortEnumsOnASingleLine: false | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowShortLambdasOnASingleLine: Empty | ||
AllowShortLoopsOnASingleLine: false | ||
AlignConsecutiveAssignments: Consecutive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Build Validation | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
build-check: | ||
name: Build Check | ||
uses: ./.github/workflows/deploy.yml | ||
with: | ||
caller_workflow: ci | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"recommendations": [ | ||
"tale.logos-vscode", | ||
"spencerwmiles.vscode-task-buttons", | ||
"redhat.vscode-yaml", | ||
"davidanson.vscode-markdownlint", | ||
"SteefH.external-formatters" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import sys | ||
import re | ||
from subprocess import Popen, PIPE, STDOUT | ||
|
||
# block level | ||
# hook -> replace with @logosformathook with ; at the end | ||
# end -> replace with @logosformatend with ; at the end | ||
# property -> replace with @logosformatproperty with NO ; at the end. Special case for block level | ||
# new -> replce with @logosformatnew with ; at the end | ||
# group -> replace with @logosformatgroup with ; at the end | ||
# subclass -> replace with @logosformatsubclass with ; at the end | ||
# top level | ||
# config -> replace with @logosformatconfig | ||
# hookf -> replace with @logosformathookf | ||
# ctor -> replace with @logosformatctor | ||
# dtor -> replace with @logosformatdtor | ||
|
||
# function level | ||
# init -> replace with @logosformatinit | ||
# c -> replace with @logosformatc | ||
# orig -> replace with @logosformatorig | ||
# log -> replace with @logosformatlog | ||
|
||
specialFilterList = ["%hook", "%end", "%new", "%group", "%subclass"] | ||
filterList = [ | ||
"%property", | ||
"%config", | ||
"%hookf", | ||
"%ctor", | ||
"%dtor", | ||
"%init", | ||
"%c", | ||
"%orig", | ||
"%log", | ||
] | ||
|
||
|
||
fileContentsList = sys.stdin.read().splitlines() | ||
newList = [] | ||
|
||
for line in fileContentsList: | ||
for token in filterList: | ||
if token in line: | ||
line = re.sub(rf"%({token[1:]})\b", r"@logosformat\1", line) | ||
for token in specialFilterList: | ||
if token in line: | ||
line = re.sub(rf"%({token[1:]})\b", r"@logosformat\1", line) + ";" | ||
newList.append(line) | ||
|
||
command = ["clang-format"] + sys.argv[1:] | ||
process = Popen(command, stdout=PIPE, stderr=None, stdin=PIPE) | ||
stdoutData = process.communicate(input="\n".join(newList).encode())[0] | ||
refinedList = stdoutData.decode().splitlines() | ||
|
||
|
||
for line in refinedList: | ||
if "@logosformat" in line: | ||
fix = line.replace("@logosformat", "%") | ||
if any(token in fix for token in specialFilterList): | ||
print(fix.replace(";","")) | ||
else: | ||
print(fix) | ||
else: | ||
print(line) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
@interface LoaderConfig : NSObject | ||
@property (nonatomic, assign) BOOL customLoadUrlEnabled; | ||
@property (nonatomic, strong) NSURL *customLoadUrl; | ||
@property(nonatomic, assign) BOOL customLoadUrlEnabled; | ||
@property(nonatomic, strong) NSURL *customLoadUrl; | ||
+ (instancetype)defaultConfig; | ||
+ (instancetype)getLoaderConfig; | ||
- (instancetype)init; | ||
- (BOOL)loadConfig; | ||
@end | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@interface RCTCxxBridge : NSObject | ||
- (void)executeApplicationScript:(NSData *)script url:(NSURL *)url async:(BOOL)async; | ||
@end | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.