Please give me an advice on chrome extension API. I'm trying to write a code that would do the same thing like when I highlight all the tabs in chrome, click the right button on them and choose reload, so all the tabs get reloaded together at once. I have no problems with highlighting the tabs, but how can I apply some operation to those highlighted tabs ?
Applying operations on a set of tabs requires passing the tab ID(s) to the respective methods in the chrome.tabs API.
So, in your case, simply remember the tab IDs of the tabs you highlighted programmatically (or use chrome.tabs.query to fetch them) and call chrome.tabs.reload sequentially, passing a single tab ID per invocation. (Unfortunately, the API does not accept an array of IDs, so you'll have to pass them one by one.)
Related
Can we add google analytic script in tag and push it to the GitHub or we should keep it secret i.e. add it to the .env file and call in .
When I tried by the second one it appears in the source page as it is and also not working properly.
I would say there is no meaning of hiding it because it is also shown when 'view page source' is clicked. All you need is a simple filter. It will only include traffic on your domain, protecting yourself from any data corruption when people hijack your Google Analytics Property ID.
To find your filters:
Go to your Google Analytics standard reports
Click on the “Admin” button in the top right
Click on “Filters”
Click “+ New Filter
Then use these settings for your filter:
Select “Create New filter for Profile”
Name your filter with something snazzy like “Hacking Defense”
Select “Custom Filter”
Select “Include”
For the Filter Field, select “Hostname”
If your site is LarsLofgren.com, you would define the filter pattern
as “larslofgren.com” and make sure to include a “\” before any “.”
Pick “No” for case-sensitive
At the end of the day, your analytics id will be visible on your website. So, I don't think you should make an effort to hide it.
Just add it to your base template and you should be ready to go :)
Currently I have a sample which I'm working on which is a basic master details page. This sample uses react-router-redux. Within the details panel I have a number of tabs which use can see different facets of the selected item... all fairly standard stuff.
When the user selects an item from the master list, the URL that the clicked <Link ... /> send them to is something like customer/123. Within the route that is registered for that url (i.e. :id), I have an indexRoute route which replacess the route to default route/tab /customer/${nextState.params.id}/address.
All this works well and the user can navigate between tabs just fine. The problem comes when the user closes the detail window and selects a different detail. As expected, it opens the tab based on the route specified by the indexRoute. Under normal circumstances, this might be fine but I want it to remember which route was selected. I'm wondering if anyone has ideas on how this should be done?
I think I can do achieve this by registering a callback with the onClick event of the Link and dispatching an event which will result in key of the selected tab being saved in the store. Then within the onEnter of the indexRoute I can access the store and pull out this saved state and target the replace to this that item.
This should work but seems like a lot, just wondering if this seems right to other?
I would use the same approach - dispatch an action when the tab is clicked and store the tab key in the store.
Use mapStateToProps to retrieve the value.
I would like to keep track of how many times a certain link in Google Spreadsheets has been clicked. I have been searching but I can't seem to be able to find how to check whether a link has been clicked or if it is possible to attach onclick event on a link.
A quick solution is to use the Google URL shorten service for the links. This page gives you the number of clicks per link.
its not possible, you cant detect cell or link clicks.
Two possibilities here:
One way is to have a server (or an apps script service) be the link "proxy" and redirect to the final site as in:
script.google.com/.../exec?url=myurl.com
your script tallies the hit and then redirects the user. redirecting without an extra click might not be possible with apps script htmlService but its possible on your own server.
you can make the urls look pretty by using =hyperlink in the cells so users dont see the long url (until click)
Another way if you have control of the links you are pointing to is to use analytics on those pages. You can use the referer to tally views that came from a spreadsheet click, or you can explicitly add parameters to each url so that youcan later filter those comming from your sheet.
I want to write an extension, which can allow users to use their mouses to select multiple tabs in Chrome (the select tabs will be highlighted), just like some multiple-tab handler extensions for Firefox, I have searched but didn't find any useful information, so I am wondering if there is a way to do it, or it's technically possible to build such an extension given Chrome's design?
Thanks!
Currently I'm using Google Chrome v20.0.1132.47 m
I can say this is already possible on that version.
All you need to do is to hold-down the CTRL key on the keyboard and then single-left click on each desired tab to multi-select them.
In addition, once they're selected, you can drag-drop them off the main window to create an independent session with those tabs on the new session. Really useful on dual monitors.
You can use the windows get function to get all of the tabs in a specified window or instead use getAll and iterate through each window then each tab within each of those windows. You must specify the option populate:true to get the tabs array to return populated. The property highlighted should tell you if that tab is highlighted.
chrome.windows.get(integer windowId, {populate:true}, function (window) {
var highlightedTabs = new Array();
for(var index in window.tabs)
if(window.tabs[index].highlighted)
highlightedTabs.push(windows.tabs[index]);
// your code here
});
For a full reference to the format of the tab object see below:
http://code.google.com/chrome/extensions/tabs.html#types
My current job is updating an existing Access97-Project. I haven't worked with Access in a long time and i can't find out, how i can explore a toolbar called "sbmbDrucken" which is obviously user-created. I just need access to the action or the code which is called by the buttons...
Is there any menu entry i missed or do i need special code for self-inspection?
TIA!
There are three different ways for menus/toolbars to be instantiated:
the old way, using macros. Before A95, this was the only way, so a lot of older apps (i.e., those converted from earlier versions) may still use macros for the menus.
defining them by hand, using the CUSTOMIZE function that you get when you right click on a toolbar in Access.
in code, using the Application.Commandbar object.
For the first you can browse your macros and see if any of them are menu macros.
For the last, you can do a search in the code for CommandBar.
For the second, just look at them through the built-in menu customization tools. Keep in mind that you may have to check them off to get them to be visible, and that the list is in no rational order. Likewise, some menus/toolbars are hidden from the customization interface. Also, you might need to look at the CUSTOM toolbar menu item.
I don't have Access 97 on hand but you may take a look of this webpage: http://www.alvechurchdata.co.uk/hints-and-tips/accaddtoolbar.html
It seems that "user-created" toolbars could be defined by handwritten code at form.load or somewhere similar. You may search CommandBars.Add and see if you can find those relevant code segments.
Hope that helps.
In the design mode, you will be able to see the toolbar & actions assigned to each of the button.
Right click on the specific toolbar
Click on Customize...
Right click on the button you would like to edit the action of.
You will be able to see the action (which could either be macro or code).
Let me know, if that doesn't help at all.