I announce that I cease all development and activity in the programming universe indefinitely. My career has reached the turning point I was not expecting for at least another year, leaving me highly off guard and without laid-out plans for this hobby's continuity. I have begun a 5-year residency program in Neurosurgery which is clearly not compatible, time-wise, with programming.
I gave in all my passion for developing, and you gave me back your loyalty and trust, even when I did not deserve that much. Now it is the time for payback. I release all my present and past work as Open Source software, in the hope some talented developer will continue maintaining and expanding my vision of a modern, sleek forum software. The intrinsic flexibility of MyBB is the true hidden gem of an otherwise outdated codebase; I do hope the project can continue and be updated complying to the latest coding standards.
I hereby thank Euan, kawaii, andrewjs18, Ben, Matt, Omar G., effone, Eric J., Devilshakerz, Wildcard, JordanMussi and all the other team members I have had the opportunity to work with when I was a MyBB team member. I thank Tomm M, my mentor, who inspired me to pick up coding with his piece-of-art plugins. And finally, I thank all of you MyBBoost subscribers who have helped me getting through my toughest university years economically.
Yours sincerely, Filippo
<script type="text/javascript">
$(document).ready(function() {
var button = $('#accept');
button.attr('disabled', true).val('Unlock by scrolling to the bottom');
$('#policyContainer').on('scroll', function() {
if($(this).scrollTop() + $(this).innerHeight() + 40 >= $(this)[0].scrollHeight) {
button.removeAttr('disabled').val('Accept and continue');
}
});
});
</script>
Let's break that down to the crucial pieces you'll most likely need to adapt to your theme in order to make it work.var button = $('#accept');
This is the target button which will change its state when scrolled down to the bottom of the page or DOM element. Either you change it to your actual button's id, or you change the button id to #accept. You decide.$('#policyContainer')
Unsurprisingly, you will need to set up a scrolling listener and attach it to either the whole document or an element. I have decided to create my own scrollable container to let the button be always visible to the user, so they will actually see the button changing color and text as soon as they reach the end of the container; but you can also attach that to $(document) if you want to change the button's appearance when the whole page is scrolled down.$(this).scrollTop() + $(this).innerHeight() + 40 >= $(this)[0].scrollHeight
Finally, this is the condition which will detect when the end of the document/element will be reached. 40 is a "safe margin" option I have added to change the button state when the user has scrolled down to the end minus 40 pixels from the real end – because users might not actually reach the true end of the container or page. You can tweak it to an higher or lower number depending on your needs.