Giter VIP home page Giter VIP logo

browserextension's Introduction

testet with chrome 106.0.5249.119

How to create this browser extension

  1. Develop the code (most important is the manifest.json and the background.js)
  2. Go to Chrome: Extensions
  3. Enable "Developer mode" (right top corner)
  4. Select the code folder by clicking on "Load unpacked" (left top corner)
  5. Use the extension

How to use AutoLogOff and Login with user by URL:

  1. Add a button with name "Logout" to your main start screen and make sure the button is always there (the button can also be outside the visible area of your screen).
  2. Add an event to the button on left mouse click with system function "LogOff"
  3. Download to runtime and add the credentials of the user in the browser URL

How to use Custom Login in TIA Portal: 0. make sure you set up AutoLogOff functionality

  1. Add a new screen with at least these 3 items: a) io field with name "ioUsername" to input the new user that shall be logged in (connect a tag if needed) b) io field with name "ioPassword" to input the corresponding password (connect a tag if needed) c) button with name "btnLogin". Do not add any event to the button!
  2. Add a button anywhere on one of your other screens and open the new screen by using the system function "OpenScreenAsPopup". The popup name (first parameter) must be "LoginDialog".
  3. Download to runtime, open your login screen, insert your credentials and click on the login button

IO field with not readable password: ***** 0. make sure you set up CustomLogin functionality

  1. Add an io field with name "ioPasswordEditable" and set Miscellaneous -> React to input -> Hidden input to true
  2. Add a tag to your new "ioPasswordEditable" and the same tag to your old "ioPassword"
  3. Move "ioPassword" outside of the visible area of the screen (the code of this BrowserExtension can access it, but the Unified user does not see it.)

browserextension's People

Contributors

derhecht40 avatar kollid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

kollid

browserextension's Issues

Add Support for ViewOfThings

The Extension could also work for WinCC ViewOfThings Website (Hosted from S7- CPU), if some minor Change apply.

Here the nessary Changes in the "background.js":

Please test the Unified RT side. I have no test opportunity.

let isViewOfThings = tabs[0].url.toLowerCase().endsWith('ViewOfThings/index.html') && tabs[0].title === 'WinCC Unified View-of-Things';
let isWinCcUnified = tabs[0].url.toLowerCase().endsWith('/webrh') && tabs[0].title === 'WinCC Unified RT';



if(isViewOfThings) {
  chrome.tabs.executeScript(
    tabs[0].id,
    {
      code: `
      // console.log('Login!');
      setTimeout(function() {
        var user = document.getElementById('user');
        var pass = document.getElementById('pass');
        var btn = document.getElementById('loginbutton');
        user.value = '${data.user}';
        pass.value = '${data2.pass}';
        pass.dispatchEvent(new Event('login'));
        btn.click();
      }, ${waitingTime});
    `
  });
}
else if (isWinCcUnified)
{
  chrome.tabs.executeScript(
    tabs[0].id,
    {
      code: `
      // console.log('Login!');
      setTimeout(function() {
        var d = document.getElementsByTagName('iframe')[0].contentWindow.document;
        var user = d.getElementById('username');
        var pass = d.getElementById('password');
        var btn = d.getElementById('loginFormSubmit');
        user.value = '${data.user}';
        pass.value = '${data2.pass}';
        pass.dispatchEvent(new Event('input'));
        btn.click();
      }, ${waitingTime});
    `
  });
}

Question about WinCC Extension

Hi, how are you?
I've benn testing the WinCC extension, but i had problem using the extension when i tried put the ip of a physical hmi.
The page didn't load, just it worked when i used the ip with hmi remote.
This extension just work with simulation?
Because i need to use autologin in chrome using a phisics HMI, like a wincc client.
If you don't undestand or doesn't make sense i can try explain it another way
Thanks !

adapt to xxx/webrh

add the moment it only works with xxx/WebRH. should also work with xxx/webrh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.