Skip to content

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

Open
MaRossetti wants to merge 1 commit into
richtr:masterfrom
MaRossetti:master
Open

added the option to specify a title when the enable function is called#124
MaRossetti wants to merge 1 commit into
richtr:masterfrom
MaRossetti:master

Conversation

@MaRossetti
Copy link
Copy Markdown

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 :)

Comment thread dist/NoSleep.js

_classCallCheck(this, NoSleep);

this.title = "No sleep";
Copy link
Copy Markdown

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 thread example/index.html
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>
Copy link
Copy Markdown

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
Copy Markdown

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