Skip to content

Commit

Permalink
Merge pull request #174 from pratikabu/development
Browse files Browse the repository at this point in the history
Merging version 5.1 for release
  • Loading branch information
pratikabu authored Apr 10, 2024
2 parents a453207 + 50a64f4 commit fde05be
Show file tree
Hide file tree
Showing 137 changed files with 297 additions and 940 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/manual-generate-zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This is a basic workflow that is manually triggered

name: Generate Browser Zip Files

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
generate-zips:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build with build.sh
run: ./build.sh
- name: Setting date and time in env variable
run: echo "date-time-env=$(date '+%Y%m%d-%H%M%S')" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
name: Uploading generated zip files
with:
name: zips-${{ github.ref_name }}-${{ env.date-time-env }}
path: generated/*.zip
26 changes: 26 additions & 0 deletions .github/workflows/pr-zip-generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PR to main branch zip generate

on:
pull_request:
branches: [ "main" ]
paths:
- 'base/**'
- 'src/**'
- 'build.xml'

jobs:
pr-generate-zips:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build with build.sh
run: ./build.sh
- name: Setting date and time in env variable
run: echo "date-time-env=$(date '+%Y%m%d-%H%M%S')" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
name: Uploading generated zip files
with:
name: pr-zips-${{ env.date-time-env }}
path: generated/*.zip
32 changes: 32 additions & 0 deletions .github/workflows/release-zip-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Auto zip Upload on Release Creation

on:
release:
types:
- created

permissions:
contents: write

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build with build.sh
run: ./build.sh
- name: rename zips with version
run: |
mv -- generated/chrome-stt.zip generated/chrome-stt-${{ github.ref_name }}.zip
mv -- generated/firefox-stt.zip generated/firefox-stt-${{ github.ref_name }}.zip
- name: Upload generated Zip file
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
fail_on_unmatched_files: true
files: |
generated/chrome-stt-${{ github.ref_name }}.zip
generated/firefox-stt-${{ github.ref_name }}.zip
40 changes: 0 additions & 40 deletions Content.txt

This file was deleted.

23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# <img valign="middle" style="vertical-align: middle;" src="rdmd-res/pratikabu-stt-256.png" width="36px"> Scroll To Top
# <img valign="middle" style="vertical-align: middle;" src="src/icons/pratikabu-stt-128.png" width="36px"> Scroll To Top

Scroll to top and vice versa in a desktop browser. A browser extension for Chrome, Firefox, Safari, Opera.
Scroll to top and vice versa in a desktop browser. A browser extension for Chrome, Firefox.

[Release Notes](https://github.com/pratikabu/scrolltotop/releases) | [@scrolltotop](https://twitter.com/scrolltotop) | [Discuss](https://github.com/pratikabu/scrolltotop/discussions)

## Download:

[link-chrome]: https://chrome.google.com/webstore/detail/scroll-to-top/hegiignepmecppikdlbohnnbfjdoaghj "Chrome Extension"
[link-chrome]: https://chromewebstore.google.com/detail/scroll-to-top/hegiignepmecppikdlbohnnbfjdoaghj "Chrome Extension"
[link-firefox]: https://addons.mozilla.org/en-US/firefox/addon/scroll-to-top/ "Mozilla Add-on"
[link-chrome-review]: https://chrome.google.com/webstore/detail/scroll-to-top/hegiignepmecppikdlbohnnbfjdoaghj/reviews "Chrome Extension Review"
[link-chrome-review]: https://chromewebstore.google.com/detail/scroll-to-top/hegiignepmecppikdlbohnnbfjdoaghj/reviews "Chrome Extension Review"
[link-opera-review]: https://addons.opera.com/en/extensions/details/scroll-to-top#feedback-container "Opera Extension Review"

- Download for [Google Chrome][link-chrome] [<img valign="middle" src="https://img.shields.io/chrome-web-store/v/hegiignepmecppikdlbohnnbfjdoaghj?label=%20">][link-chrome]
Expand All @@ -21,14 +21,10 @@ Scroll to top and vice versa in a desktop browser. A browser extension for Chrom
- Support development by [Donating](https://pratikabu.com/donate).
- Help me translate the addon.

## How to Build:
Currently the build system is based on Apache Ant.
- Load the ants/build.xml file in the Ant view.
- Execute the respective browser task.
- You can also run ant on ants/build.xml directly, in this case it will generate the deployment code for all browsers.
- This can then be used in respective browsers to load as a temporary extension.

<img width="250px" src="rdmd-res/generated-folder-structure.png">
## How to Run:
- The `src` folder contains all the code to be used in any Chromium browsers to load as a temporary extension.
- To debug for Firefox, use the `firefox` folder in the `generated` folder.
- You'll have to run `./build.sh` to generate the `generated` folder.

## Bookmarklet
If someone does not like installing an extension. Then you can create this Bookmark in your bookmark toolbar.
Expand All @@ -40,4 +36,7 @@ This bookmarklet will scroll up or down based on the location of your screen.
javascript:(function () {var paBody = document.body, paHtml = document.documentElement, paMaxY = Math.max(paBody.scrollHeight, paBody.offsetHeight, paHtml.clientHeight, paHtml.scrollHeight, paHtml.offsetHeight) - window.innerHeight, paBreakPoint = 300; if(window.scrollY > paBreakPoint || paBreakPoint >= paMaxY && window.scrollY != 0) window.scroll({top: 0, behavior: 'smooth'}); else window.scroll({top: paMaxY, behavior: 'smooth'});})();
```

There is a no-permission version of this extension, if someone is concerned about the permissions that this extension requires.
https://github.com/pratikabu/scrolltotop-lite

Read more about the [author](https://pratikabu.com).
29 changes: 0 additions & 29 deletions ants/build-browser.properties

This file was deleted.

28 changes: 0 additions & 28 deletions ants/build-browser.xml

This file was deleted.

12 changes: 0 additions & 12 deletions ants/build-chrome.properties

This file was deleted.

36 changes: 0 additions & 36 deletions ants/build-chrome.xml

This file was deleted.

19 changes: 0 additions & 19 deletions ants/build-firefox.properties

This file was deleted.

50 changes: 0 additions & 50 deletions ants/build-firefox.xml

This file was deleted.

17 changes: 0 additions & 17 deletions ants/build-opera-chromium.properties

This file was deleted.

Loading

0 comments on commit fde05be

Please sign in to comment.