« first day (4913 days earlier)      last day (29 days later) » 

12:26 AM
posted on March 28, 2024 by Release Managers

Hello All, The Dev channel has been updated to ChromeOS version 15823.11.0 with Chrome Browser version 124.0.6367.18 for most ChromeOS devices. If you find new issues, please let us know one of the following ways: File a bug Visit our Chrome OS communitiesGeneral: Chromebook Help CommunityBeta Specific: ChromeOS Beta Help CommunityReport an issue or send feedback on Chrome I

 
 
7 hours later…
7:45 AM
@MileMijatović, as far as i can tell it does work, take a look at this
        password<input id=pass>
        <span>new password</span><input id=newpass><input type=button value=change><br>
        <input type=button value=login>

        <pre id=output></pre>


        <script type="module">

              import bcrypt from 'https://esm.run/bcryptjs';


              async function changePassword(userId,password){

                    const { newPassword, oldPassword, repeatPassword } = password;

                    if (newPassword !== repeatPassword) {
                      throw new Error('no match');
i had to use a compatible library bcryptjs npmjs.com/package/bcryptjs to get it to run in the browser
heres a jsbin jsbin.com/hobipadeha/edit?html,output when/if you run the jsbin, make the output window wider to get the top line all on the screen
also i tried to use code as similar as yours, so if it throws in changePassword, ive forgotten to pick it up and i dont think i can easily edit my comments on here ( for some reason )
 
 
2 hours later…
9:26 AM
userSchema.pre('save', async function (next) {
  if (this.isModified('password')) {
    this.password = await hashPassword(this.password);
  }
  next();
});
because I have pre save , it's hashed two times
so instead of

user.password = hashedPassword;
await user.save();

should be

user.password = newPassword;
await user.save();
and newPassword will be saved as hashed password because will react .pre('save' ... :)
and that's is
 
i thought it might be something like that, bc from what i could see your code should have been working, is your pre save called on user.save or is it called automatically when you update the password property
 
it's not called automatically, but only when user.save is called
 
 
5 hours later…
2:39 PM
!!choose "CoC DD" or "Miner"
 
Miner
 
3:37 PM
Hello, so regarding my issue with this post https://stackoverflow.com/questions/78244315/remove-particle-animation-on-javascript?noredirect=1#comment137943357_78244315
i wanted to clarify why i dont want to delete the text directly
 
@manelcosio Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
firstly i tried this aproach just for test purposes, and strangely the file was still loading like it was before the edit, thought it was cached, so cleared the browser cache but still ended with the same result
 
@manelcosio, ok
so you deleted the the text in the file, cleared the cache and it was still there when you loaded the page?
 
exactly
i can record a video showcasing the issue if eneded
 
what was the backend?
nodejs, php etc
 
3:40 PM
im using wordpress
 
so php then ?
 
yeah
 
does it help you pin point your workflow, bc if youre sure you changed the right file and cleared the browser cache, i guess it must be being cached somewhere on the server
 
i will take a look on it, although even though it did result by deleting or comenting the mentioned code , i wanted a solution where i didn't had to directly change the files, because in the future if the theme receives an update i will have to change it once again
i could create a child theme, but in this case the theme i got is already child of other, so i followed a suggestion of doing a customization and original folder with style.css and functions.php and in the root theme folder i did include both files from the respective folders
 
whats the name of the theme
you could try adding something like
 
3:48 PM
as for the delete code i had the idea to run the website in another browser with the code edited, and now it works like intended
so the only issue right now is to make a better aproach to cancel the animation
 
        window.addEventListener('load',run,true);

        function run(){

              var canvas                = document.getElementById('canvas');
              canvas.addEventListener   = override;

              function override(type,callback,mode){

                    return false;

              }//override

        }//run
what it attempts to do is run before the other event listeners are added, then override the addeventlistener method on that canvas element to do nothing
it does depend on when exactly the other event listeners are actually added though
 
4:08 PM
@manelcosio Please don't post unformatted code - use the up arrow to edit your post, then hit Ctrl + K to format the code in that post. See the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
1 message moved to Trash can
@manelcosio Please don't post unformatted code - use the up arrow to edit your post, then hit Ctrl + K to format the code in that post. See the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
1 message moved to Trash can
 
to post code, paste it into the chat box, then without pressing enter, highlight it all and press ctrl-k
 
<?php
function add_custom_js() {
    ?>
    <script>
        //  JavaScript code here
        window.addEventListener('load', run, true);

        function run() {
            var canvas = document.getElementById('canvas');
            canvas.addEventListener = override;

            function override(type, callback, mode) {
                return false;
            }
        }
    </script>
    <?php
}
add_action('wp_head', 'add_custom_js', 0);
so i added this on my functions.php on wp_head and priority 0 (high) to make sure it to be loaded before the other event listeners but wasnt successfull
 
its attempting to run on the capturing phase of page load
it might be better to add it to the bottom of the body element and then run it straight away
you need that canvas element to have been parsed by the browser and then run the override code before its own event listeners have been added
to run it straight away you would just use
              var canvas                = document.getElementById('canvas');
              canvas.addEventListener   = override;

              function override(type,callback,mode){

                    return false;

              }//override
 
but to run it straight away i would need to edit the files directly no?
to add the code to the final of the body element, could use the wp_footer if im not mistaken
although i have already tried that approach with no success
 
no do the same thing you did before, but just use that latest bit of code instead of the window.addEventListener('load',... stuff
in the add_action('wp_head', .... bit can you use something like 'wp_body'
 
4:22 PM
ohh got it
just tried now, and it is working as intended!!!
thank you alot for the time spent if you wish please reply to the post with the code and i will vote
my knowledge of js is quite low and first time working with wordpress so somethings still are kinda "new" to me
 
 
4 hours later…
7:57 PM
 

« first day (4913 days earlier)      last day (29 days later) »