Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
JasminDreasond authored Apr 10, 2018
1 parent 79b4bd7 commit 5ff9d2c
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 46 deletions.
77 changes: 43 additions & 34 deletions everywhere.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@

<head>
<meta http-equiv="content-type" content="text/html; charset=utf8" />
<meta name="theme-color" content="#adb7d2" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<link rel="icon" href="favicon.ico" type="image/gif" sizes="16x16">
<title>Browser Ponies Everywhere</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap_pc.css" />
<link rel="stylesheet" type="text/css" href="css/gui.css" />
<style type="text/css">
html,
Expand Down Expand Up @@ -82,6 +88,8 @@
margin-left: 10px;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="js/plugins/bootstrap.js"></script>
<script type="text/javascript" src="js/basecfg.js" id="browser-ponies-config"></script>
<script type="text/javascript" src="js/browserponies.js" id="browser-ponies-script"></script>
<script type="text/javascript" src="js/gui-common.js"></script>
Expand All @@ -92,15 +100,15 @@
<iframe id="iframe" border="0"></iframe>

<div id="buttons">
<a class="button glyphicon glyphicon-play" href="javascript:startPonies();void(0)" title="Start" id="start" style="display:none;"></a>
<a class="button glyphicon glyphicon-stop" href="javascript:stopPonies();void(0)" title="Stop" id="stop"></a>
<a class="button glyphicon glyphicon-cog" href="javascript:toggleSettings();void(0)" title="Settings"></a>
<a class="button glyphicon glyphicon-play" data-toggle="tooltip" title="Start" id="start" style="display:none;"></a>
<a class="button glyphicon glyphicon-stop" data-toggle="tooltip" title="Stop" id="stop"></a>
<a class="button glyphicon glyphicon-cog" data-toggle="tooltip" id="settings" title="Settings"></a>
</div>

<div id="main" class="container" style="display:none;">
<div id="main-inner">
<form onsubmit="location.hash = $('url').value; hideSettings(); return false;">
<input type="text" id="url" name="url" onclick="this.select();" placeholder="http://example.com/" />
<form id="editurl">
<input type="text" id="url" name="url" placeholder="http://example.com/" />
<button class="clickgo">Go</button>
</form>

Expand All @@ -109,27 +117,27 @@ <h2>Change settings and choose your ponies</h2>
<table>
<tbody>
<tr>
<td><input type="checkbox" id="enableaudio" onchange="updateConfig();" /></td>
<td><input type="checkbox" id="enableaudio" /></td>
<td><label for="enableaudio">Enable Audio</label>
<span id="noaudio">(Your Browser does not support HTML5 Audio. Get a
<a href="http://www.google.com/chrome" title="Goolge Chrome or&hellip;">better</a>
<a href="http://www.mozilla.org/firefox/" title="&hellip;Mozilla Firefox">browser</a>.)</span>
<a href="http://www.google.com/chrome" data-toggle="tooltip" title="Goolge Chrome or&hellip;">better</a>
<a href="http://www.mozilla.org/firefox/" data-toggle="tooltip" title="&hellip;Mozilla Firefox">browser</a>.)</span>
<span id="hasaudio" style="display:none;">(Your browser supports HTML 5 Audio.)</span>
</td>
</tr>

<tr>
<td><input type="checkbox" id="showfps" onchange="updateConfig();" /></td>
<td><input type="checkbox" id="showfps" /></td>
<td><label for="showfps">Show Frames per Second</label></td>
</tr>

<tr>
<td><input type="checkbox" id="progressbar" onchange="updateConfig();" checked/></td>
<td><input type="checkbox" id="progressbar" checked/></td>
<td><label for="progressbar">Show Progress Bar</label></td>
</tr>

<tr>
<td><input type="checkbox" id="dontspeak" onchange="updateDontSpeak(this.checked);" /></td>
<td><input type="checkbox" id="dontspeak" /></td>
<td><label for="dontspeak">Never Speak</label></td>
</tr>
</tbody>
Expand All @@ -140,99 +148,100 @@ <h2>Change settings and choose your ponies</h2>
<tr>
<td><label for="speed">Speed Multiplier:</label></td>
<td>
<input type="text" class="number" id="speed" value="3.0" data-value="3.0" data-min="0.1" data-decimals="1" data-step="0.1" size="3" onchange="numberFieldChanged.call(this,event);" />
<input type="text" class="number" id="speed" value="3.0" data-value="3.0" data-min="0.1" data-decimals="1" data-step="0.1" size="3" />
</td>
<td></td>
<td>
<button onclick="increaseNumberField.call($('speed'));">+</button>
<button onclick="decreaseNumberField.call($('speed'));">&ndash;</button>
<button id="speedi">+</button>
<button id="speedd">&ndash;</button>
</td>
</tr>

<tr title="Even if this is 0% ponies will speak if an animation requires it.">
<tr data-toggle="tooltip" title="Even if this is 0% ponies will speak if an animation requires it.">
<td><label for="speak">Random Speak Probability:</label></td>
<td>
<input type="text" class="number" id="speak" value="15" data-value="15" data-min="0" data-max="100" data-decimals="0" size="3" onchange="numberFieldChanged.call(this,event);" />
<input type="text" class="number" id="speak" value="15" data-value="15" data-min="0" data-max="100" data-decimals="0" size="3" />
</td>
<td>%</td>
<td>
<button onclick="increaseNumberField.call($('speak'));">+</button>
<button onclick="decreaseNumberField.call($('speak'));">&ndash;</button>
<button id="speaki">+</button>
<button id="speakd">&ndash;</button>
</td>
</tr>

<tr>
<td><label for="volume">Volume:</label></td>
<td>
<input type="text" class="number" id="volume" value="100" data-value="100" data-min="0" data-max="100" data-decimals="0" data-step="10" size="3" onchange="numberFieldChanged.call(this,event);" />
<input type="text" class="number" id="volume" value="100" data-value="100" data-min="0" data-max="100" data-decimals="0" data-step="10" size="3" />
</td>
<td>%</td>
<td>
<button onclick="increaseNumberField.call($('volume'));">+</button>
<button onclick="decreaseNumberField.call($('volume'));">&ndash;</button>
<button id="volumei">+</button>
<button id="volumed">&ndash;</button>
</td>
</tr>

<tr>
<td><label for="fps">Frames per Second:</label></td>
<td>
<input type="text" class="number" id="fps" value="25" data-value="25" data-min="1" data-decimals="0" size="3" onchange="numberFieldChanged.call(this,event);" />
<input type="text" class="number" id="fps" value="25" data-value="25" data-min="1" data-decimals="0" size="3" />
</td>
<td></td>
<td>
<button onclick="increaseNumberField.call($('fps'));">+</button>
<button onclick="decreaseNumberField.call($('fps'));">&ndash;</button>
<button id="fpsi">+</button>
<button id="fpsd">&ndash;</button>
</td>
</tr>

<tr>
<td><label for="fade">Fade Duration:</label></td>
<td>
<input type="text" class="number" id="fade" value="0.5" data-value="0.5" data-min="0" data-decimals="1" data-step="0.1" size="3" onchange="numberFieldChanged.call(this,event);" />
<input type="text" class="number" id="fade" value="0.5" data-value="0.5" data-min="0" data-decimals="1" data-step="0.1" size="3" />
</td>
<td>sec</td>
<td>
<button onclick="increaseNumberField.call($('fade'));">+</button>
<button onclick="decreaseNumberField.call($('fade'));">&ndash;</button>
<button id="fadei">+</button>
<button id="faded">&ndash;</button>
</td>
</tr>
</tbody>
</table>

<div id="filterwrapper">
<label for="addcat">Filter Categories:</label>
<button id="addcat" onclick="showCategorySelect();">+</button>
<button id="addcat">+</button>
<ul id="catselect" style="display:none;">
<li id="allcatsadded">All Added</li>
</ul>
<ul id="catlist"></ul>
<span id="nocatadded" style="display:none;">No Category Selected</span>
<button onclick="removeAllCategories();" title="Remove All">&#x232B;</button>
<button id="removeall" data-toggle="tooltip" title="Remove All">&#x232B;</button>
</div>

<ul id="ponylist"></ul>

<p id="zero"><button onclick="setAllZero();">Set all Ponies to 0</button></p>
<p id="zero"><button id="setallzero">Set all Ponies to 0</button></p>

<h2>About</h2>

<p>
This is a version of <a href="ponies.html">Browser Ponies</a> that lets you put ponies on a website by simply putting <tt>"http://tinyurl.com/ponyfy#"</tt> in front of the URL of the website. So e.g. <tt>"<a href="http://example.com/">example.com</a>"</tt> becomes
<tt>"<a href="http://tinyurl.com/ponyfy#example.com">http://tinyurl.com/ponyfy#example.com</a>"</tt>.
This is a version of <a href="ponies.html">Browser Ponies</a> that lets you put ponies on a website by simply putting <tt>"https://tinyurl.com/ponyfy2#"</tt> in front of the URL of the website. So e.g. <tt>"<a href="http://example.com/">example.com</a>"</tt> becomes
<tt>"<a href="https://tinyurl.com/ponyfy2#example.com">https://tinyurl.com/ponyfy2#example.com</a>"</tt>.
</p>

<p>
Note that not all websites allow embedding in an iframe (which is used here). E.g.
<a href="http://tinyurl.com/ponyfy#google.com">Google does not work</a>.
<a href="https://tinyurl.com/ponyfy2#google.com">Google does not work</a>.
</p>

<p>
See <a href="ponies.html">this</a> for more information and a way to embed ponies to your website permanently.
</p>

<div id="footer">&copy; 2011 Mathias Panzenb&ouml;ck | Page Edited by Jackie Apkon</div>
<div id="footer">&copy; 2011-2013 <a href="https://github.com/panzi/Browser-Ponies" target="_blank">Mathias Panzenb&ouml;ck</a> | 2017-2018 Updated by <a href="https://github.com/JasminDreasond/Browser-Ponies" target="_blank">Jasmin Dreasond</a></div>
</div>
</div>
<script type="text/javascript" src="js/everywhere_b.js"></script>
</body>

</html>
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ <h2>What is this?</h2>
<h2>Short URL</h2>

<p>
You can put ponies on a website by simply putting <tt>"http://tinyurl.com/ponyfy#"</tt> in front of the URL of the website. So e.g. <tt>"<a href="http://example.com/">example.com</a>"</tt> becomes
<tt>"<a href="http://tinyurl.com/ponyfy#example.com">http://tinyurl.com/ponyfy#example.com</a>"</tt>.
You can put ponies on a website by simply putting <tt>"https://tinyurl.com/ponyfy2#"</tt> in front of the URL of the website. So e.g. <tt>"<a href="http://example.com/">example.com</a>"</tt> becomes
<tt>"<a href="https://tinyurl.com/ponyfy2#example.com">https://tinyurl.com/ponyfy2#example.com</a>"</tt>.
</p>

<p>
Note that not all websites allow embedding in an iframe (which is used here). E.g.
<a href="http://tinyurl.com/ponyfy#google.com">Google does not work</a>.
<a href="https://tinyurl.com/ponyfy2#google.com">Google does not work</a>.
</p>

</div>
Expand Down Expand Up @@ -510,4 +510,4 @@ <h2>License</h2>
<script type="text/javascript" src="js/bottom.js"></script>
</body>

</html>
</html>
2 changes: 1 addition & 1 deletion js/bottom.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jQuery("#bt_removeall").click(function() {
void(0);
});

jQuery('[data-toggle="tooltip"]').tooltip();
jQuery('[data-toggle="tooltip"]').tooltip();
9 changes: 2 additions & 7 deletions js/everywhere.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,7 @@ function loadConfig() {
if (!config) {
config = {
spawn: {
"rainbow dash": 1,
"pinkie pie": 1,
"applejack": 1,
"twilight sparkle": 1,
"fluttershy": 1,
"rarity": 1
"derpy hooves": 1
}
};
}
Expand Down Expand Up @@ -162,7 +157,7 @@ function loadPage() {

if (url) {
if (!/^[a-z0-9]+:/.test(url)) {
url = "http://" + url.replace(/^\/+/, '');
url = "https://" + url.replace(/^\/+/, '');
}

if (url !== iframe.src) {
Expand Down
91 changes: 91 additions & 0 deletions js/everywhere_b.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
jQuery("#start").click(function() {
startPonies();
void(0);
});

jQuery("#stop").click(function() {
stopPonies();
void(0);
});

jQuery("#settings").click(function() {
toggleSettings();
void(0);
});

jQuery("#url").click(function() {
this.select();
});


jQuery("#speedi").click(function() {
increaseNumberField.call($('speed'));
});

jQuery("#speedd").click(function() {
decreaseNumberField.call($('speed'));
});

jQuery("#speaki").click(function() {
increaseNumberField.call($('speak'));
});

jQuery("#speakd").click(function() {
decreaseNumberField.call($('speak'));
});

jQuery("#volumei").click(function() {
increaseNumberField.call($('volume'));
});

jQuery("#volumed").click(function() {
decreaseNumberField.call($('volume'));
});

jQuery("#fpsi").click(function() {
increaseNumberField.call($('fps'));
});

jQuery("#fpsd").click(function() {
decreaseNumberField.call($('fps'));
});

jQuery("#fadei").click(function() {
increaseNumberField.call($('fade'));
});

jQuery("#faded").click(function() {
decreaseNumberField.call($('fade'));
});

jQuery("#addcat").click(function() {
showCategorySelect();
});

jQuery("#removeall").click(function() {
removeAllCategories();
});

jQuery("#setallzero").click(function() {
setAllZero();
});

jQuery("#enableaudio, #showfps, #progressbar").change(function() {
updateConfig();
});

jQuery("#dontspeak").change(function() {
updateDontSpeak(this.checked);
});

jQuery("#speed, #speak, #volume, #fps, #fade").change(function() {
numberFieldChanged.call(this, event);
});

jQuery("#editurl").submit(function(event) {
location.hash = $('url').value;
hideSettings();
return false;
});

jQuery('[data-toggle="tooltip"]').tooltip();

0 comments on commit 5ff9d2c

Please sign in to comment.