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

added the option to specify a title when the enable function is called #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MaRossetti
Copy link

Hey man! I'm Marco, a Frontend Developer from Barcelona. I added a small feature to your already awesome package (good job btw, you saved me). I hope you like what i added even though it's not a big thing.

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

I needed to show a particular video title when an IOS device is locked. As you can see here the "NoSleep" title is shown:

IMG_A31F279A54A4-1

I just wanted the possibility to customize it a little bit :)

@@ -128,6 +128,7 @@ var NoSleep = function () {

_classCallCheck(this, NoSleep);

this.title = "No sleep";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use capital S here to keep the default value as-is (i.e. No Sleep)

Comment on lines -3 to +9
<head>
<title>NoSleep.js - Simple Test Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1>NoSleep Test Page</h1>
<script src="../dist/NoSleep.min.js"></script>
<head>
<title>NoSleep.js - Simple Test Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1>NoSleep Test Page</h1>
<script src="../dist/NoSleep.min.js"></script>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diff seems to originate due to the use of different format settings from the repo's owner. I suggest reverting those changes because the owner may not like them

@keichenblat
Copy link

Thank you Marco 👑
I also ran into the need to customize the title, so I was happy to see that someone has already taken care of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants