Install multiple Tampermonkey Scripts - tampermonkey

is there any way how I can offer the option on my website, that the user can install multiple scripts with one click?
I am maintaining my code in several scripts because they have different functions or working on different sub domains in our intranet.
When my colleagues are changing the computer, chrome will install the tampermonkey add-on but not the scripts. That's why they will have to install them after every change of their place (it's happening often, because were using "hot desking" in our company).
I am offer the download with this source:
Website<br />
Language Lines<br />
Phonetic Alphabet<br />
<button id="install">Install</button>
I want to to add a button to install all scripts at the same time.
I tried something like this:
$('#install').click(function(){
$('a').click();
});
but it is not working. actually nothing is happening :(
Do you have any suggestions how I can simplify the installation process of the scripts? The links above are only a part of it. The total amount is about 10-15 scripts and clicking everyone one by one is very annoying :/
Thanks in advance

Related

The Babel-core module not working with Lingui

I am new to the concept of Localizing my react-application. After doing some research online, It seems as if jsLingui is the best library to use and implement translation on my React application. Following tutorials from https://lingui.js.org/tutorials/react.html , everything seems pretty straight forward. but when I run the command
$ lingui extract , I get the error :
module.js:557
throw err;
Error: Cannot find module 'babel-core'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25) .....
I have tried re-installing the babel-core , and it shows installed. Even when I check on my file system, I see the folder as node_modules/babel-core .
I also checked my package.json and I see "babel-core": "^6.26.3" as part of my devDependencies. Please any ideas around this will be helpful.
Beside, the pressing question, I also have a few other questions;
1) In the documentation, I am not sure on where to keep .babelrc file created. I hope it is suppose to be inside my babel-core folder.
2) When I was reading on the jslingui library, I discover that, they are still working on something that will help separate translations to be done page by page. I do not know whether this task is completed or still under development because, I am really interested in this one since my application really big and loading the whole translation at all times might become a real issue.
3) What if I have text in one part of my application which is exactly the same as in another part of my application, is it possible to write it in one section and call the id in another part to give me back the information?? or it is out of scope of the library .
4) I am building a social platform therefore I have information coming from the DB, which I do not know the content therefore such information can not be translated using jslingui just as it is. I will like to introduce some translation to this information( similar to what is happening on Facebook). I know this task needs some serious Artificial intelligence in the areas of natural language processing and machine learning. Please, Any good library that I can use to help my application translate only the portions of data provided to it( definitely information coming from DB)??. I have tried googling on this but I got nothing concrete( NB: I do not want Google Translate because, It will help to translate the whole page + names etc) which will mess-up the user experience of my application
jslingui
Thanks
I have tried re-installing the babel-core , and it shows installed. Even when I check on my file system, I see the folder as node_modules/babel-core . I also checked my package.json and I see "babel-core": "^6.26.3" as part of my devDependencies. Please any ideas around this will be helpful.
If you've installed #lingui/cli globally, please remove it and reinstall locally. If you use Babel 7 (your plugins/preset start with #babel/), then you need to install babel-core#^7.0.0-bridge.0 and #babel/core. Both locally as devDependencies. What also helped in some cases is good old turn it off and on again: rm -rf node_modules and reinstall everything...
1) In the documentation, I am not sure on where to keep .babelrc file created. I hope it is suppose to be inside my babel-core folder.
You should keep it in the root of your repository (next to package.json) unless you have specific needs.
2) When I was reading on the jslingui library, I discover that, they are still working on something that will help separate translations to be done page by page. I do not know whether this task is completed or still under development
It's still under development. However, it's a bit different - it helps you create separate message files, but not automatically. That's something we need to solve in further versinons.
3) What if I have text in one part of my application which is exactly the same as in another part of my application, is it possible to write it in one section and call the id in another part to give me back the information?
You have two options. Either you're using generated message IDs:
// App.js
<Trans>Hello World</Trans>
// Component.js uses the same message
<Trans>Hello World</Trans>
In this case, you only need to translate Hello World once, because messages are grouped when collected from source files.
Other option is that you're using custom IDs:
// App.js - define message
<Trans id="msg.hello">Hello World</Trans>
// Component.js - use message
<Trans id="msg.hello" />
4) I am building a social platform therefore I have information coming from the DB, which I do not know the content therefore such information can not be translated using jslingui just as it is. ...
I can't recommend any approach here, but it seems you need to use a machine translation. Either Google Translate or a better one, if you manage to find it. My guess it'll be either low-quality or expensive because as you said, this isn't a trivial task.

Indesign real-time package for collaboration

I manage a team of designers working on Indesign.
When we work on a project, it often happens that a designer has to work on the project of another. We work with Dropbox for Business.
But when we take the work of another designer, there is often missing links and fonts.
Is there a plugin or a way to develop a plugin that would allow, when we create a new indd file (or for the protection of the same file):
Automatically create a "Links" folder and another "Document fonts" at side of the indd file
Systematically add a new link or new typography in the corresponding folder?
To simplify: each action on font or on a link, make a kind of "Indesign Package" in real time?
If this is not a solution, do you have any solutions to meet this need?
I don't know of a specific script or plugin that does this.
However, it should be possible to write a script with an eventhandler with a beforeClose event that runs certain script commands every time a user closes a document (or even every time a user adds, changes or deletes a link). At this point the script could run some copyLink commands on all the images and fonts (?) placing them all in the folders next to the document.
The whole script could be made a startup script, so it becomes active anytime any user runs InDesign.
(I'm actually not sure, if fonts can be copied so easily. Worst case scenario would be that the script would need to run some packaging command to gather the fonts somewhere, copy them over to where you need them and then delete the rest of the temporary package.)
Did you consider Creative Cloud Libraries ? They are meant to allow sharing assets within a team. Apart form that, you users would need to have a same access to the file system (a common drive letter for the network path for example).
Another solution would be to use a DAM solution so users would link files from the DAM.
Eventually, you could sure think of a script as mdomino offered.

Stubborn Silverlight Caching Issue?

Bear with a bit me before jumping straight to the normal caching fix solutions. Here's what happening:
I have a project, a single project out of dozens in our solution that appears to be refusing to update its code when I build and run. It's not part of the xap, but a dll sitting along side the xap.
Things I've already determined not a solution:
I've checked the output of its dll and it has been built, and its contents updated to match my code, verified with dotPeek. But it refuses to display the updated code.
I clean, rebuild the solution, and restart the dev server but it refuses to display the updated code.
I switch to a different browser, no dice.
I clear browser cache's to no avail.
I completely delete my local code and do a fresh fetch from our repository, again, no love from silverlight.
I have not been without a little success though. The ONE bone I've been thrown was over the weekend. Not touching it for a couple days, I came back to work on Monday and, without having done anything to it, it just updated. Now, however, it's cached again, or something, because it's stuck in the last set of changes I made to it.
So my question is this: What am I missing?
Most likely your files may be read only and MS Build fails to display error message and it does not update files. In case if you have mistakenly checked in your .xap files, then this is possible, you will have to remove it from your source control and also make .xap file writable by removing readonly checkbox.
Visual Studio checks in your .xap files by mistake and silverlight build does not report any error.
Second, do you have any other file backup service installed like Shadow copy or Dropbox kind of online backup service, something is probably making xap files readonly and that is causing this problem.
Here there are couple answers: Prevent Silverlight 3 from caching while debugging
Code below helped me(add this to Page_Load of page that hosted the app ):
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-100));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
UPDATE:
Prevent Silverlight xap from being cached by proxy server
"So my question is this: What am I missing?"
An internal caching mechanism that our application uses. So, none of you could really have helped me as it was an architectural feature of our software.

Unable to change Manifest for deployed WPF application

Well.. what I'm really needing is to allow the user to install two different versions of the same application. Changing the assembly name just generates a lot of errors that require too much work. I've been reading that changing the assembly identity tells WPF that those are different applications and so the second application (it's a ClickOnce) doesn't replace the previously installed. Sadly this cannot be change inside VS2010.
I've changed the MyApp.exe.manifest here, I Think:
assemblyIdentity name="MyWPFApp_NEWNAME" version="1.0.0.0" language="neutral" processorArchitecture="x86"
And resigned the manifest this way:
mage.exe -update MyWPFApp.exe.manifest -certfile D:\MyDir\MyWPFApp_TemporaryKey.pfx
mage.exe -update MyWPFApp.application -appmanifest MyWPFApp.exe.manifest -certfile D:\MyDir\MyWPFApp_TemporaryKey.pfx
the signing states sucessfull, but when trying to open the application it get an error stating that the Hash is misscalculated...
As this is my first try to modify a deployed application with no doubt I'm doing something wrong...
Have you tried right clicking on your start-up project and going to properties. Then in properties in the "Application" tab look for "Assembly Information" button. Click that button and change the desired values. Rebuild your project and then try to get the user to install this version while an older version is still installed.
Solved... (this always happens to me as soon as I post a question) for client to detect the versions as different applications all I needed was to create a different key file (pfx) for each deployment and change the "Name of application group" in the application properties.

Using Visual Studio to create a more complex setup project

I need to learn more about creating setup projects from within Visual Studio to support the following scenario:
When the user starts the setup, he needs to choose between the parts that he wants to set up. The setup should offer to install three web services, one web site and maybe even run some SQL scripts to install/update the database.
During installation, the user will need to tell where he wants the sites/services to be installed within IIS. He also needs to specify the database connection which is used within the services/sites and to update the database. And there will probably be a few other wishes too. It should also support an uninstall of the site and services, but the database can continue to exist.
Is this even possible with the Setup projects that Visual Studio creates? If not, no worries. I don't need an alternative solution! I just need to know if this is possible before trying myself and discovering it's not possible after weeks of trying... This is for an internal project and I want to make life easier for the administrators who need to install/upgrade these sites/ services every time when there's an update. (About once every two weeks.)
Stay well away from vdproj stuff and move to WiX ASAP (As you'll see me being advised in questions I asked here). For a start, flexibility around where to put the IIS apps is seriously limited (you get one virtual dir and the user can only choose the name, you cant have multiple instances).
The other side of this is of course that the vdproj stuff is an 80% solution. Ultimately you can add as many custom steps as you like, and they can pop up dialogs and whatever they like. There's no reason why a custom step cant do all the things you want.
I just know that I once thought like you, and looking back wish someone had grabbed me by the scruff of the neck and said, just use the proper stuff - even if it seems a little harder initially. There is a conversion tool that will suck in your vdproj and spit you out a WiX.
By all means, try wizarding up what you need and seeing if it works - most of the stuff is pretty searchable - just know when to call it quits.

Resources