This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update versions, better build phase
- Loading branch information
Showing
31 changed files
with
1,836 additions
and
18,090 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
export const CLAP_LIMIT = 50; | ||
export const CLAP_CONTAINER_SELECTOR = 'js-actionMultirecommend'; | ||
export const CLAP_BUTTON_SELECTOR = 'js-actionMultirecommendButton'; | ||
export const CLAP_UNDO_BUTTON_SELECTOR = 'js-clapUndo'; | ||
export const CLAP_COMMENTS_SELECTOR = 'js-actionMultirecommendButton'; | ||
export const CLAP_CONTAINER_SELECTOR = "js-actionMultirecommend"; | ||
export const CLAP_BUTTON_SELECTOR = "js-actionMultirecommendButton"; | ||
export const CLAP_UNDO_BUTTON_SELECTOR = "js-clapUndo"; | ||
export const CLAP_COMMENTS_SELECTOR = "js-actionMultirecommendButton"; | ||
export const CLAP_TYPE = { | ||
DISABLED: 'disabled', | ||
LEFT: 'post_share_widget', | ||
FOOTER: 'post_actions_footer', | ||
BAR: 'post_actions_bar', | ||
DISABLED: "disabled", | ||
LEFT: "post_share_widget", | ||
FOOTER: "post_actions_footer", | ||
BAR: "post_actions_bar" | ||
}; | ||
export const CLAP_SOUND = { | ||
NORMAL: 'clap', | ||
SUPER: 'superClap', | ||
}; | ||
export const CLAP_DEFAULT_SETTINGS = { | ||
...CLAP_SYNC_SETTINGS, | ||
...CLAP_LOCAL_SETTINGS, | ||
NORMAL: "clap", | ||
SUPER: "superClap" | ||
}; | ||
export const CLAP_SYNC_SETTINGS = { | ||
sounds: true, | ||
sounds: true | ||
}; | ||
export const CLAP_LOCAL_SETTINGS = { | ||
clap: null, | ||
superClap: null, | ||
superClap: null | ||
}; | ||
export const CLAP_DEFAULT_SETTINGS = { | ||
...CLAP_SYNC_SETTINGS, | ||
...CLAP_LOCAL_SETTINGS | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
import 'chromereload/devonly'; // eslint-disable-line | ||
|
||
import Clappe from './Clappe'; | ||
import Clappe from "./Clappe"; | ||
|
||
const html = document.body.innerHTML; | ||
|
||
function isMedium() { | ||
return /medium/.test(document.head.getAttribute('prefix')); | ||
return /medium/.test(document.head.getAttribute("prefix")); | ||
} | ||
|
||
function isUserLogged() { | ||
const loggedRegex = /"isAuthenticated":([a-z]*)/; | ||
return html.match(loggedRegex) && html.match(loggedRegex)[1] === 'true'; | ||
return html.match(loggedRegex) && html.match(loggedRegex)[1] === "true"; | ||
} | ||
|
||
if (isMedium() && isUserLogged()) { | ||
console.info( | ||
'%c 👏 Clappe installed!', | ||
'border: 1px solid black; color: black' | ||
"%c 👏 Clappe installed!", | ||
"border: 1px solid black; color: black" | ||
); | ||
new Clappe(html).install(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
.js-actionMultirecommend { | ||
position: relative; | ||
} | ||
.js-actionMultirecommend:hover .clappe > .clappe__superClap { | ||
opacity: 1; | ||
} | ||
.js-actionMultirecommend:hover .clappe > .clappe__superClap--disabled { | ||
opacity: 0; | ||
transform: translate(0, 0) scale(0); | ||
} | ||
.js-actionMultirecommend:hover .clappe > .clappe__superClap--footer { | ||
transform: translate(-40px, -40px) scale(1); | ||
} | ||
.js-actionMultirecommend:hover .clappe > .clappe__superClap--left { | ||
transform: translate(40px, -40px) scale(1); | ||
} | ||
.js-actionMultirecommend:hover .clappe > .clappe__superClap--bar { | ||
transform: translate(-43px, 8px) scale(1); | ||
} | ||
|
||
.clappe { | ||
position: absolute; | ||
bottom: 0; | ||
width: 60px; | ||
height: 60px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.clappe__superClap { | ||
opacity: 0; | ||
outline: none; | ||
line-height: 40px; | ||
width: 40px; | ||
height: 40px; | ||
border: 1px solid rgba(0, 0, 0, 0.15); | ||
border-radius: 999em; | ||
text-align: center; | ||
transition: 0.2s all; | ||
transform: translate(0, 0) scale(0); | ||
} | ||
.clappe__superClap--bar { | ||
line-height: 25px; | ||
font-size: 12px; | ||
width: 25px; | ||
height: 25px; | ||
transform: translate(-15px, 8px) scale(0); | ||
} | ||
.clappe__superClap:hover { | ||
cursor: pointer; | ||
border-color: #00ab6b; | ||
} |
Oops, something went wrong.