Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
zgtk-guri committed Jan 26, 2024
0 parents commit 1534449
Show file tree
Hide file tree
Showing 11 changed files with 1,174 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
Binary file added aki-old-new.zip
Binary file not shown.
Binary file added icon128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"manifest_version": 3,
"name": "Akizuki Old to New Product Page Redirector",
"version": "1.0.0",
"description": "秋月電子通商の旧製品ページを新製品ページにリダイレクトします。2024年1月26日に行われたサイトリニューアルにより、I-03142のような通販コードから103142のような販売コードに変更になりました。それにより発生したリンク切れをリダイレクトする拡張機能です。",
"icons": {
"48": "icon48.png",
"128": "icon128.png"
},
"declarative_net_request":{
"rule_resources":[
{
"id":"ruleset",
"enabled":true,
"path":"ruleset.json"
}
]
},
"permissions":[
"declarativeNetRequest"
],
"host_permissions":[
"*://*.akizukidenshi.com/*"
]
}
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "aki-old-new",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"devDependencies": {
"@crxjs/vite-plugin": "^1.0.14",
"typescript": "^4.5.4",
"vite": "^2.9.9"
},
"dependencies": {
"@types/chrome": "^0.0.259"
}
}
18 changes: 18 additions & 0 deletions ruleset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"id":1,
"priority": 1,
"action":{
"type":"redirect",
"redirect":{
"regexSubstitution": "https://akizukidenshi.com/catalog/g/g1\\1"
}
},
"condition":{
"regexFilter":"^https?://(?:www\\.)?akizukidenshi\\.com/catalog/g/g[A-Z]-([0-9]+)",
"resourceTypes":[
"main_frame"
]
}
}
]
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {}
20 changes: 20 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ESNext", "DOM"],
"moduleResolution": "Node",
"strict": true,
"sourceMap": true,
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"noEmit": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"skipLibCheck": true
},
"include": ["src"]
}
7 changes: 7 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
import { crx } from '@crxjs/vite-plugin'
import manifest from './manifest.json'

export default defineConfig({
plugins: [crx({ manifest })],
})

0 comments on commit 1534449

Please sign in to comment.