Correct user assignment
This commit is contained in:
parent
40f869e7c3
commit
a7299e84fc
|
@ -317,14 +317,13 @@ const removeExtraInputs = () => {
|
|||
|
||||
class _LobstersFunction {
|
||||
constructor () {
|
||||
this.curUser = 'will'; // remove line when done with production
|
||||
// this.curUser = null, //for finished product
|
||||
this.curUser = document.body.getAttribute('data-username');
|
||||
|
||||
this.storyFlagReasons = ({<%= Vote::STORY_REASONS.map{|k,v|
|
||||
"#{k.inspect}: #{v.inspect}" }.join(", ") %>});
|
||||
this.storyFlagReasons = ({<%= Vote::STORY_REASONS.map{|k,v|
|
||||
"#{k.inspect}: #{v.inspect}" }.join(", ") %>});
|
||||
|
||||
this.commentFlagReasons = ({<%= Vote::COMMENT_REASONS.map{|k,v|
|
||||
"#{k.inspect}: #{v.inspect}" }.join(", ") %>});
|
||||
this.commentFlagReasons = ({<%= Vote::COMMENT_REASONS.map{|k,v|
|
||||
"#{k.inspect}: #{v.inspect}" }.join(", ") %>});
|
||||
}
|
||||
|
||||
bounceToLogin() {
|
||||
|
@ -346,7 +345,7 @@ class _LobstersFunction {
|
|||
|
||||
checkStoryTitle() { //partial removal (due to select2)
|
||||
const titleLocation = document.getElementById('story_title');
|
||||
if(!titleLocation) return;
|
||||
if (!titleLocation) return;
|
||||
|
||||
const title = titleLocation.value;
|
||||
if (!title) return;
|
||||
|
@ -543,12 +542,12 @@ class _LobstersFunction {
|
|||
}
|
||||
}
|
||||
|
||||
const Lobster = new _LobstersFunction();
|
||||
|
||||
onPageLoad(() => {
|
||||
|
||||
// Global Functions
|
||||
|
||||
const Lobster = new _LobstersFunction();
|
||||
|
||||
on('click', '.markdown_help_label', (event) => {
|
||||
parentSelector(event.target, '.markdown_help_toggler').querySelector('.markdown_help').classList.toggle('display-block');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue