Coder Social home page Coder Social logo

technology-snail / mysnail Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 515 KB

This fun chrome extension allows you to have a customizable virtual pet snail that shows up on every website you visit. ๐ŸŒ

Home Page: https://technology-snail.github.io/MySnail/

License: MIT License

HTML 1.98% JavaScript 98.02%
chrome-extension fun snail virtual-pet api extension extension-chrome snails svg-animations website-api

mysnail's Introduction

MySnail Chrome Extension

This chrome extension, developed by TechnologySnail, allows you to have a virtual pet snail that shows up on every website you visit. You can customize your snail by changing its colors, size, and speed in the popup menu or in the options page. The snail continuously crawls across the screen, and comes out of the left side after it has fully disappeared off the right side of the screen. To hide the snail, simply double-click it. It will come back when you reload the page or come back to it.

MySnail API

Although the chrome extension is MySnail's central purpose, MySnail also has an API. If you are a website developer, you can add a touch of fun to any site by including the following code in the <head> element of your page:

<script src="https://technology-snail.github.io/MySnail/resources/snail.js"></script>
<script>new mySnail()</script>

You could also include the API with only the first line and make the snail appear later. If you have something that takes a long time to load on your site, for example, you could create the snail when the user clicks the button:

<button onclick="new mySnail()">Begin Lengthy Processing....</button>

This would add a hilarious twist to your website to make the wait not seem so long!

You can also customize the snail with the following parameters:

Parameter Name What It Is Default Value
Freeze Set to true if you want the snail to stay in one spot and false if you want the snail to crawl from one side of the screen to the other. false
Size How big the snail should be (note that quality will not be lost to pixelation) 0.25 (about 1 inch tall)
Speed Approximately how fast the snail should move (the distance in pixels per frame, at 70 FPS) 0.4
Colors A list of four CSS colors in this order: inner shell, outer shell, lower body, upper body ["#00f2ff", "#003fff", "#ffaa00", "#ffe500"]

For example, if you wanted to create a moving snail that was an inch tall and moved painfully slow, with a blue shell and a yellow-to-orange body:

new mySnail(false, 0.25, 0.1, ["deepskyblue", "royalblue", "orange", "yellow"]);

If you want the snail to disappear later, you can use the hide() function. Just make sure to store the snail in a variable first:

aSnailNamedJoe = new mySnail(); // Stores a new snail in a variable
aSnailNamedJoe.hide(); // Makes the snail disappear

There are also some other functions you can use. Here are just a few examples:

aSnailNamedJoe.show(); // Makes snail reappear
aSnailNamedJoe.setSize(1); // Makes the snail BIG
aSnailNamedJoe.setSize(0.1); // Makes the snail little
aSnailNamedJoe.setColors(["red","red","red","red"]); // Makes the snail completely red
aSnailNamedJoe.frozen = true; // Freeze the snail in the lower-left corner of the screen (antennae will still move)
aSnailNamedJoe.frozen = false; // Allow a frozen snail to move again
aSnailNamedJoe.speed = 0.1; // Make the snail move very slow
aSnailNamedJoe.speed = 5; // Make the snail move too fast!
aSnailNamedJoe.x = 0; // Teleport the snail to the left side of the screen
aSnailNamedJoe.x = window.innerWidth / 2; Teleport the snail halfway across the screen

Please note that the snail is completely immune to mouse events and clicks will pass through it to anything that it may be covering up.


Future Plans:

Version 2.0 of the chrome extension will bring drastic changes to MySnail, including but not limited to:

  • The snail's ability to speak with a word bubble
  • An options page for more settings beyond the usual found in the popup
  • The ability to click objects behind the snail (FINALLY!)
  • An on/off switch in the extension popup for showing/hiding the snail
  • Checkboxes in the options page to choose what the snail can talk about, including the following options:
  • Low Battery Notification at (customizable value, default = 5)%
  • Notification when newer version of MySnail Chrome extension is available
  • A reminder to drink water, randomly but at approximately 30 minute intervals
  • Friendly reminder to get off screen at certain time, settable between 7:00pm and 11:00pm, defaulting to 10:00pm. (You can ignore this for five minutes, but the snail will tell you the same thing more sternly five minutes later, and five minutes after that the snail will make random elements from your screen start disappearing... Back to normal at 4:00am.)
  • Fun fact of the day, based on something about the national or international day it is. (Example: Penguin Awareness Day, January 20, may have a fun fact about penguins.)
  • Breaking News! (only good news, no bad) This can include an epic newly discovered species, a major advancement in technology, a rescue, etc., directly from MySnail News, a source you can trust that won't depress you with bad news.

If you would like to use the pre-release most recent version of MySnail, you can download it here as long as you understand that it is still a work in progress and will be officially released when it is ready. MySnail 2.0 BETA is currently better than MySnail 1.9.6, but it simply isn't finished yet. (From the list above of what the snail will be able to say, the snail can only tell you when your battery level is low. The other options will be added soon; thank you for your patience.)

Shortly after the release of version 2.0, version 3.0 will be released. Version 3 will involve:

  • The ability to click and drag snails to other locations on the page
  • MySnail Chat, so you can add other people with the extension to your friends list and you will be able to see their snail if you are on the same site (they can turn off this option for privacy reasons if they want). You can click your snail and an empty word bubble will appear above it that you can type in. Hit enter and your friends see the word bubble above your snail, so you can talk to each other through your snails! A simple but hilariously fun way to communicate, especially when collaborating on a project. (Technical note: "On the same site" refers to the same domain, not an exact URL. earth.google.com is separate from mail.google.com, but earth.google.com/hello is the same as earth.google.com/hi and earth.google.com.)
  • An available pro plan, involving the following:
  • Have multiple snails at a time on a site!
  • Customize and save multiple snails, with all your snails synced across Chrome!
  • The snails may have discoidal shells (like all of them have now) OR turret shells, so you can have a greater variety of snail types!
  • The snails may not only be at the bottom of the page but also on the walls and the ceiling! (optional)
  • More! (TBD, potentially AI stuff....)

image < Get the MySnail Chrome Extension Today!

How to Install the Extension Now

Unfortunately, the MySnail Chrome Extension has not yet been published to the Chrome Web Store. The TechnologySnail business will not be officially releasing any products until a home website for TechnologySnail has been fully developed and there are at least three solid products to offer, one of which would be the MySnail Chrome Extension.

Despite the fact that you can't just click a button on the Chrome Web Store and have the snail on your screen, you can still get the MySnail Chrome Extension on your computer by using a different method... And it is totally worth it!

Just follow the simple steps below to get your pet digital snail:

  1. Download the Chrome Extension by clicking this link.
  2. Unzip/Unpack/Extract the previously downloaded zip file into its own folder.
  3. Go to the URL chrome://extensions.
  4. In the upper-right corner, you will see an on/off switch with the words "Developer mode" next to it. Turn this switch on.
  5. A set of buttons will appear near the upper-left corner. Click the one that says "Load unpacked". When a file manager dialog opens, go to the folder you obtained in step two and select the folder inside of it called "extension-files".
  6. That's it! Enjoy your snail!

Feedback

If you have any technical difficulties, questions, or feedback, please participate in this repository's discussion, or send an email to [email protected].

mysnail's People

Contributors

wesleymcginn avatar

Stargazers

 avatar

Watchers

 avatar

mysnail's Issues

Snail Speaking

There should be an option in the settings that will enable the snail to speak to the user with a word bubble. This should be able to be disabled in case it annoys the user. The snail could warn the user if their computer's battery level is too low or if there is a newer version of the extension. Perhaps the snail could even deliver the fun fact of the day. If things go very well, perhaps the snail could actually come to life with the power of AI to actually say intelligible things to the user based on the web content they view. Whatever the snail says, a word bubble system that can be enabled/disabled in the settings.html page should be added.

Queue Cancelation

On tab A, the snail notices that the computer battery is low, so it queues a word bubble to bring this up to the user. Before the snail gets to the part of the screen where it may speak (the "stage"), the user navigates to tab B, where the snail does the same thing. The snail on tab B notifies the user that their battery is low, so they plug it in and charge it. A few hours later, the battery is fully charged, and the user navigates back to tab A. The snail will now tell them that their battery level is extremely low and that they should plug in their computer immediately.

This problem must be resolved through queue cancelation. Queues should not merely be strings of text, but entire objects that come with:

  • Text
  • Duration
  • Boolean check before display (for cancelation)
  • onSpeak function (triggers when snail actually says the queued statement)

This will help with various aspects of programming the snail's speech.

The Snail Shouldn't Float (or sink)

On most websites, the snail is sitting exactly on the bottom of the webpage. On some websites, however, such as the Chrome Developer Site, the snail is floating several pixels above the bottom of the screen, as shown below:

Notice how far the snail is from the bottom of the screenshot.

On other websites, there is an even worse problem: the snail is sinking into the ground! This is especially bad if the snail is set to be small. Here is what happens on an online QR code scanner:

And here is an example from the settings page in this extension itself:

Notice that not even half of the snail is visible.

Clearly, this bug must be solved.

Remove Box Around Snail

On some websites, certain elements are set to have certain default backgrounds based on CSS code. For example:

svg {
  background-color:  blue;
}

In the specific instance of svg default styles for either background-color or background-image CSS properties, those properties also apply to the rectangle behind the snail. For example, on Academo, the snail is enclosed in a photo of outer space:
Snail with unintentional background photo of outer space

The background color of the SVG element containing the snail should always be completely transparent and imageless.

Snail Background Overlap Removal

When the snail crawls across the bottom of a webpage, it covers up all of the elements behind its path. If a submit button or options exist at the bottom of the page, the snail makes them impossible to click, even if the snail itself is not over the top of them.

To fix this, the snail should move across the screen with Javascript rather than SMIL. The actual SVG element will move, not an element within an SVG element that covers the entire width of the screen.

AI Training by User Vote

When the "Randomize" button is clicked in the MySnail Chrome Extension popup, an AI decides whether or not colors on the snail go well together. New colors are randomly generated until the AI decides that the color combination is top quality. Of course, in order for the AI to do this, it needs to have training data. This means that it needs to have several examples of color combinations and a grade for each of those combinations. This allows the AI to predict what "grade" each new color combination would be given.

The current problem is that the AI doesn't always do such a great job at judging color combinations because it doesn't have enough examples in its training data. One potential solution to this problem is "AI Training by User Vote". When the "Randomize" button is clicked and the colors on the snail change, a thumbs up and thumbs down button could appear next to the snail. Clicking one of these buttons would add training data to the AI, so it could better predict future color combinations.

Snail Infestation in Printed Documents and Saved Webpages

When a user tries to print a webpage, the snail is printed along with all the content. When a user tries to download a webpage as a PDF to their computer, going through the printing dialogue (Ctrl + p), the snail can be found at the bottom of the last page. This has caused serious problems for some already as they have almost turned in official documents to important businesses, with a snail at the bottom of each PDF. This cannot happen and we will get to work on fixing it right away.

Add setting to make snail in front of all elements or behind some

The snail will currently often be hiding underneath a menu bar or icon. On some websites, the snail is always covered up by certain HTML elements. While some people may like the fact that the snail is weaving in and out of certain elements, adding a sort of 3D effect to its functionality, others may want the snail to always be in front of everything else. A checkbox option should therefore be added to the advanced settings page that will allow the user to decide whether or not the snail will always be in front of everything else.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.