<commit_before>h1. Proto Backstretch

Backstretch is javascript class that allows you to add a dynamically-resized background image to any page.
It depends on Prototype with Scripty2 (earlier versions of Scriptaculous may also work).
The image will stretch to fit the page, and will automatically resize as the window size changes.

h2. Demo


h2. Options

h3. centeredX

The ratio of the width/height of the image doesn't always jive with the width/height of the window. This parameter controls whether or not we center the image on the X axis to account for the discrepancy. (type=Boolean, default=true)

h3. centeredY

This parameter controls whether or not we center the image on the Y axis to account for the aforementioned discrepancy. (type=Boolean, default=true)

h3. speed

This is the speed at which the image will fade in, after downloading is complete, in seconds. 1.0 is the default.


h2. Setup

Include the Prototype / Scripty2 libraries and Backstretch files in your webpage (preferably at the top of the page, in the head). If you're particularly concerned about
speed, consider loading your scripts with async/defer. Placing the javascript at the bottom of the page is also supported:<commit_msg>Whitespace fixed.<commit_after>h1. Proto Backstretch

Backstretch is javascript class that allows you to add a dynamically-resized background image to any page.
It depends on Prototype with Scripty2 (earlier versions of Scriptaculous may also work).
The image will stretch to fit the page, and will automatically resize as the window size changes.

h2. Demo


h2. Options

h3. centeredX

The ratio of the width/height of the image doesn't always jive with the width/height of the window. This parameter controls whether or not we center the image on the X axis to account for the discrepancy. (type=Boolean, default=true)

h3. centeredY

This parameter controls whether or not we center the image on the Y axis to account for the aforementioned discrepancy. (type=Boolean, default=true)

h3. speed

This is the speed at which the image will fade in, after downloading is complete, in seconds. 1.0 is the default.


h2. Setup

Include the Prototype / Scripty2 libraries and Backstretch files in your webpage (preferably at the top of the page, in the head). If you're particularly concerned about speed, consider loading your scripts with async/defer. Placing the javascript at the bottom of the page is also supported:
{'fraction_non_alphanumeric': 0.039884868421052634, 'fraction_numerical': 0.009046052631578948, 'mean_word_length': 4.418708240534521, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '600865', 'n_tokens_mistral': 655, 'n_tokens_neox': 606, 'n_words': 374}