Giter VIP home page Giter VIP logo

browserextension's Issues

adapt to xxx/webrh

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

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 !

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});
    `
  });
}

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.