How do I prevent google task from scrolling to the new set date with a bookmarklet? - google-tasks

Whenever I am changing the date of a task in Google task, the UI scrolls down to the new date which I find very distracting. Is there any way to disable this behaviour with a bookmarklet?
I tried looking for a Scroll function with the Inspect tool without success

Related

Xamarin Forms - Disable loading spinner on ListView

I have a Xamarin forms app where I'm using ListViews to display some data, with pull to refresh enabled. When the ListView is pulled and starts the refresh it has its own spinner animation. However, this doesn't display when the page first loads, and so I've wired in a separate ActivityIndicator to indicate loading for just the first time. It's styled different though. I would prefer to use the ActivityIndicator, since it's what's used through the rest of the app, but I haven't found a way to disable the spinner animation on the ListView yet. Is it possible to disable it? Any suggestions would be appreciated, thanks!
There are a few ways I can think of to solve this.
Don't use Pull-to-refresh. Xamarin.Forms has this built in and you can't customize it without using renderers and altering controls. Instead, start your refresh another way (ToolbarItem, etc) and continue using your custom ActivityIndicator.
Customize the existing ListViews UIRefreshControl. You may be able to use a renderer or "Effect" to customize the RefreshControl being used by the native control. This would allow you to style it a little close to what your custom indicator looks like.
Change the color of the spinner. This is my least favorite option. You could workaround this by changing the color of the spinner to match the background so you don't see it.

How to detect support of immediate scroll events with Modernizr?

I use ScrollMagic to trigger animations on each section of a web page. This works great for desktop and for some browsers on mobile.
However there are some mobile browsers (older versions of Safari and Chrome (on ipad)) that don't play these animations until the scrolling event is finished. I know there are ways around that. However instead, I would like to simply turn off these animations when not supported.
Is there a way to detect that with Modernizr? Or would I have to target specific browsers and its versions?
You wouldn't detect parallax animation. That isn't a browser feature, that is something that you can use browser features to accomplish.
In this case you would you be looking to detect if you are reflow the page during a scroll, or if it waits until after the scroll event fires. There is currently no detect for this, and creating one would get pretty greasy.
I believe what you are seeing is the result of the scroll event not firing as you scroll on certain browsers. I cannot think of a way to simulate this with javascript (triggering a scroll event will obviously only trigger one scroll event, so there isn't anything to gain there). As a result, I am not confident that you would ever be able to accurately detect this.
I completely agree with Patrick's answer, but would like to add that it is indeed possible to have immediate scroll events on the mobile versions of chrome and safari, you are talking about.
The issue you're describing is related to all iOS devices before version 8.
Before then the mobile browser engine did not trigger "true" scroll events while scrolling, but only once scrolling had come to a full halt (so after the inertia stopped). Even the execution of javascript was suspended, so you couldn't just run a loop to check the scroll position.
Long story short: There are ways around it using containers for scrolling and requestAnimationFrame.
The easiest way I found to get scroll events for pre iOS8 devices is iScroll.
I would recommend to check out this: http://janpaepke.github.io/ScrollMagic/examples/advanced/mobile_basic.html
and this:
http://janpaepke.github.io/ScrollMagic/examples/expert/mobile_advanced.html
So getting back to your original question: How to detect when you would even need those workarounds.
You'd need to check if the you're on iOS version 7 or lower, which, to my knowledge, can't be done with modernizr, as it is a feature detection library.
So check out this thread to learn more: Detect iOS version less than 5 with JavaScript

Detect Background Color Change in Google Spreadsheet with Apps Script

I created an onEdit() trigger in Google App Script, but it only works when I change the value of a cell; not when I change the background color. How can I fix it?
NOTE: There is an open issue about onChange(e) to report that it's not working. See Google script onChange event doens't fire anymore
Instead of using onEdit(e) use onChange(e). When the background of a cell be changed, the value of e.changeType will be FORMAT.
function onChange(e) {
// Show a popup with a message showing the type of change.
SpreadsheetApp.getActiveSpreadsheet().toast(e.changeType);
}
References
Events Objects - Google Apps Scripts Guides

How to populate Picker items before open, using Xamarin.Forms

Using Xamarin.Forms, how do I populate a Picker with items, immediately before the Picker opens?
We have a number of pickers on the same page and it would be inefficient to populate all items upfront, as some of the queries are expensive. For reference, I'm trying to get this working on Xamarin.Android first, and am using the latest stable version - 1.2.36257 at the time of writing.
I've tried:
Focused event - This almost works, but changes to Items are not applied until the next time the Picker opens.
TapGestureRecognizer - The Tapped event doesn't seem to be fired. Perhaps it doesn't work with a Picker.
There's nothing that the Xamarin.Forms Picker exposes from what I can see either, that would allow you to achieve what your wanting.
TapGesture's can be troublesome. For instance I quickly tried it on WindowsPhone, and that is not recognizing the TapGesture either. Your also find some different behavior with different controls as well - with the same response not being uniform across platforms.
I tried hooking into the Picker PropertyChanged / PropertyChanging, and this has the outcome exactly the same as attempting to hook into the Focused event handler that you experienced, with it only working after the picker has initially been displayed.
The only way around this would be to write a custom renderer to achieve what you want to do.
Within that, you could then expose custom events such as OnBeforeAppearing, that would allow you to then pre-load the picker with the items you need from the page at time of use.

Firefox add-on tab-specific buttons and scripts, similar to Page Actions in Google Chrome

I want to write a Firefox extension that acts exactly like the built-in RSS feed scanner (as an exercise). It should do the following:
On each new page / tab load, it should scan the content of the page for RSS feeds
If there are RSS feeds in the page, it should put a button in the location bar that the user can click
On clicking the button, a speech bubble should appear under the button (the way a speech bubble appears under the bookmarks star when you click on it), with information on the feeds and buttons to subscribe to them
So my main questions are:
What is the process to run specific content scripts for specific pages?
What is the process to use the results of those scripts to update the speech bubble for each location bar button for each tab?
Basically, I'm trying to figure out how to do in Firefox what Page Actions are in Google Chrome.
To clarify, I want to replicate this functionality in Firefox: http://code.google.com/chrome/extensions/pageAction.html
Please help! :)
This question is similar to this question:
how to have tab-specific xul control with firefox
to have tab specific control. Usually (or maybe I am wrong),the newly added control is the same one across all the different tabs. Change from any tab will change its appearance in all tabs.
still looking for solutions or ideas.

Resources