Skip to content

Commit

Permalink
feat: support hash value
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonish committed Apr 14, 2024
1 parent b866ef3 commit 2b464f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/common/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const convert = {
return '{HOSTNAME}';
case '5':
return '{PATH}';
case '6':
return '{HASH}';
case '1':
default:
return '{HREF}';
Expand Down
2 changes: 2 additions & 0 deletions src/common/operation.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ const operation = {
return uri.hostname;
case '{PATH}':
return uri.href.replace(uri.origin, '');
case '{HASH}':
return uri.hash.replace(/^#/, '');
default:
return arg0;
}
Expand Down
5 changes: 2 additions & 3 deletions src/components/OptionsGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
</el-input>
</el-col>
<el-col :span="4">
<el-button :type="isEdit ? 'warning' : 'primary'" @click="onEdit">{{
isEdit ? $ui.get('optionsSave') : $ui.get('optionsEdit')
}}</el-button>
<el-button :type="isEdit ? 'warning' : 'primary'" @click="onEdit">{{ isEdit ? $ui.get('optionsSave') : $ui.get('optionsEdit') }}</el-button>
</el-col>
</el-row>
<div class="options-settings">
Expand All @@ -34,6 +32,7 @@
<el-tag type="info" title="e.g., hppts://www.example.com" @click="onTagClick('{ORIGIN}')">{ORIGIN}</el-tag>
<el-tag type="warning" title="e.g., www.example.com" @click="onTagClick('{HOSTNAME}')">{HOSTNAME}</el-tag>
<el-tag type="danger" title="e.g., /path/to/test.php?type=0#extra" @click="onTagClick('{PATH}')">{PATH}</el-tag>
<el-tag color="white" title="e.g., extra" @click="onTagClick('{HASH}')">{HASH}</el-tag>
</span>
</div>
<div class="options-settings">
Expand Down

0 comments on commit 2b464f2

Please sign in to comment.