Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Development #171

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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@v3
- 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@v3
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@v3
- 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@v3
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@v3
- 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.

19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# <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)

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